Date/Time Functions

Top  Previous  Next

Fathom Reference > Fathom Operators, Functions, and Units > Date/Time Functions

date( year, month, day)

 

Takes its three arguments and returns a date. The month and day arguments are optional. Example: date( 1777, 4, 7) returns April 7, 1777.

dayOfMonth (date)

 

 

Returns the day of the month corresponding to the given date.Example: If date is Aug 31, 2005, dayOfMonth(date) returns 31.

dayOfWeek( date)

 

Returns the day of the week (as a number) corresponding to the given date.Example: If date is Aug 31, 2005, dayOfWeek(date) returns 4 because August 31, 2005 is a Wednesday

dayOfWeekName( date)

 

Returns the short name of the day of the week corresponding to the given date. Example: If date is Aug 31, 2005, dayOfWeekName(date) returns "Wed".

dayOfYear( date)

 

Returns the day of the year corresponding to the given date. Example: If date is Aug 31, 2005, dayOfYear(date) returns 243 because Aug 31 is the 243rd day of 2005.

hour( date_time)

 

Returns the hour (in 24 hour time) corresponding to the given date_time. Example: If date_time is 3:30 PM on Aug 31, 2005, hour(date_time) returns 15.

minute( date_time)

Returns the minute corresponding to the given date_time. Example: If date_time is 3:30 PM on Aug 31, 2005, minute(date_time) returns 30.

month( date)

Returns the number of the month corresponding to the given date. Example: If date is Aug 31, 2005, month(date) returns 8.

monthName( date)

 

Returns the short name of the month corresponding to the given date. Example: If date is Aug 31, 2005, monthName(date) returns "August".

now( )

 

Returns the current date and time as determined by the computer.

second( date_time)

 

Returns the second corresponding to the given date_time. Example: If date_time is 3:30:05 PM on Aug 31, 2005, second(date_time) returns 5.

stringToDateTime( date-time-string)

 

Attempts to form a date-time from the given string as though it were typed in.

ticks( )

 

Returns the current number of 60ths of a second since the computer was last turned on.

today( )

Returns the current date as determined by the computer

 

year( date)

Returns the year corresponding to the given date. Example: If date is Aug 31, 2005, year(date) returns 2005.