DateFormat (date[,format_string])
Dateformat(now(),"dd/MM/YYYY") ------ 26/02/2019
Dateformat(now(),"MM") ------ 02
Dateformat(now(),"MMM") ------ Feb
Dateformat(now(),"MMMM") ------ February
Dateformat(now(),"dd") ------ 26
Dateformat(now(),"dd") ------ 26
Dateformat(now(),"yy") ------ 19
Note: "MM" indicates for month and "mm" indicates for minute.
DateFormat(DateValue("10-01-00"),"EEEE, MMMM, d yyyy hh:mm a zzzz")
Returns a string: "Sunday, October, 1 2000 12:00 AM Pacific Daylight Time"
Given: Now()=6-Nov-00 10:15:15 PST
DateFormat("dd MMMM yy HH'h'mm") --Returns a string: "06 November 00 10h15"
DateFormat("M/d/y HH:mm:ss.SSSS") --- Returns a string: "11/6/00 10:15:15.892"
Convert timestamps to a string.
DateFormat("d-MMM-yyyy HH:mm:ss.SSSS z") --8-Apr-2000 15:38:17.456 PDT
DateFormat("M/d/y HH:mm") -----4/8/00 15:38
DateFormat("MMMM d, yyyy h:mm") -----April 8, 2000 3:38
DateFormat("M/d/y") -----8/4/00
Support special absolute and relative times.
DateStart("month") ---"beginning of this month" (midnight on the 1st)
"end of last month" (one millisecond
DateEnd("month",DateValue("10-01-00")) ---before midnight on the last day of the
previous month).Given: The current month is November.
DateEnd("day") --"beginning of day" (midnight today) DateStart("day")
"end of day" (one millisecond before
midnight yesterday)
DateAdd("day",-,DateStart("day")) - "beginning of yesterday" (a 24 hour
period beginning at midnight yesterday)
DateAdd("week",-1) - "last week" (a seven day period beginning
at midnight on Sunday of last week)
DateAdd("day",1) - "tomorrow"
Date() - "today"
Now() - "now"