Date Functions
Select date_function(parameter)
1. Dateadd (datepart,number,date): Adds the number of dateparts to the date Example
Select Dateadd (mm, 6, '1/1/01')-[ 2001-07-01] Select Dateadd (mm, -6, '1/1/01')-[ 2001-07-01]
2. Datediff (datepart,date1,date2): Number of dateparts between two dates Example
Select datediff(dd, '10/3/01', '10/9/01')
3. Getdate() :Returns current date and time in internal format Example
Select Getdate()
Datepart | Abbreviation |
Day | DD,D |
Day of year | DY |
Hour | HH |
Millisecond | MS |
Minute | MI |
Month | MM,M |
Quarter | QQ |
Second | SS, S |
Week | WK |
Weekday | DW |
Year | YY, YYYY |
1 comments:
Brilliant blog I visit this blog it's incredibly awesome. Curiously, in this blog content formed doubtlessly and sensible. The substance of information is helpful.
Oracle Fusion HCM Online Training
Oracle Fusion Financials Online Training
Post a Comment