Date time functions

Date time functions

 

NOW() - Returns the current date and time.

 

DATE() - Returns the current date.

 

TIME() - Returns the current time.

 

DATETOSTR(date) - Converts a date constituent of DateTime value to a string.

 

DATETIMETOSTR(datetime) - Converts a DateTime value to a string.

 

TIMETOSTR(time) - Converts a time constituent of DateTime value to a string.

 

STRTODATE(string) - Converts a string to a DateTime value. Time part is set to 0.

 

STRTODATETIME(string) - Converts a string to a DateTime value.

 

STRTOTIME(string) - Converts a time string to a DateTime value.

 

YEAR(date) - Returns the year of specified date.

 

MONTH(date) - Returns the month of specified date.

 

DAY(date) - Returns the day of specified date.

 

SYEAR(date) - Returns the year of date in string representation.

 

SMONTH(date) - Returns the month of date in string representation. Month which is less than 10 have zero in place of first symbol - "01", "02" and so on ...

 

SDAY(date) - Returns the day of date in string representation. Day which is less than 10 have zero in place of first symbol - "01", "02" and so on ...

 

DTOS(date) - Converts date to the string formatted as yyyymmdd.

 

STOD(string) - Converts string formatted as yyyymmdd to date value.