Check documentation for the latest version 6.0 of dhtmlxSuite getFormatedDate DHTMLX Docs

getFormatedDate

returns formatted date as a string

string getFormatedDate(string format,Date date);

Parameters

formatstringthe date format (if omitted, the current date format is used)
dateDatethe date to apply the specified format to (if omitted, the current date is used)

Returns

stringdate of the corresponding format

Example

// for date which is currently selected
var d = myCalendar.getFormatedDate("%d/%m/%y");
 
// for today
var d = myCalendar.getFormatedDate("%d/%m/%y", new Date());

Details

See the available date formats

Back to top