Today's date is {ts '2008-08-30 02:52:06'}
Using DateFormat, we can display that date in a number of different ways:
- 30-Aug-08
- Aug-30-2008
- August 30, 2008
- 08/30/2008
- 30-Aug-2008
- Sat, August 30, 2008
- 30/8/08
Using DatePart, we can extract an integer representing the various dateparts from that value.
- year: 2008
- quarter: 3
- month: 8
- day of year: 243
- day: 30
- weekday: 7
- week: 35
- hour: 2
- minute: 52
- second: 6
The current time is:02:52 AM
You can also show the Month by giving an integer like:May
Return to the Code Examples Page.This will calculate the difference in time

