Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Increment Dates by 1
How To Increment Dates by 1? - Oracle DBA FAQ - Understanding SQL Basics
✍: FYIcenter.com
If you have a date, and you want to increment it by 1. You can do this by adding the date with a date interval. You can also do this by adding the number 1 directly on the date. The tutorial example below shows you how to adding numbers to dates, and take date differences:
SELECT TO_DATE('30-APR-06') + 1 FROM DUAL; -- Adding 1 day to a date 01-MAY-06 SELECT TO_DATE('01-MAY-06') - TO_DATE('30-APR-06') FROM DUAL; -- Taking date differences 1 SELECT SYSTIMESTAMP + 1 FROM DUAL; -- The number you add is always in days. 08-MAY-06 SELECT TO_CHAR(SYSTIMESTAMP+1,'DD-MON-YYYY HH24:MI:SS.FF3') FROM DUAL; -- Error: Adding 1 to a timestamp makes it a date.
2016-07-06, 31064👍, 1💬
Popular Posts:
Does .NET support UNICODE and how do you know it supports? Yes .NET definitely supports UNICODE. Try...
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...
What is the result of using Option Explicit? When writing your C program, you can include files in t...
Is Session_End event supported in all session modes ? Session_End event occurs only in “Inproc mode”...
What is application domain? Explain. An application domain is the CLR equivalent of an operation sys...