Skip to content

Date Formatter

Guilherme Reginaldo Ruella edited this page Oct 8, 2016 · 3 revisions

df

df is a global variable that provides an access point to the date formatter.


df.asMysqlDatetime(date)

Returns a string representation of the date as the MySQL datetime format (YYYY-MM-DD HH:mm:ss)


  • date - Date - The date to be formatted

df.asMysqlDate(date)

Returns a string representation of the date as the MySQL datetime format, but it ignores the time portion (YYYY-MM-DD)


  • date - Date - The date to be formatted

df.asFullDate(date)

Returns a string representation of the date as DD/MM/YYYY


  • date - Date - The date to be formatted

df.asShortDate(date)

Returns a string representation of the date as DD/MM


  • date - Date - The date to be formatted

df.asShortTime(date)

Returns a string representation of the date as HH:mm:ss


  • date - Date - The date to be formatted

df.asShorterTime(date)

Returns a string representation of the date as HH:mm


  • date - Date - The date to be formatted

Clone this wiki locally