Navigation:  MCL Reference > Conversion Functions >

DateStr( )

Print this Topic Previous pageReturn to chapter overviewNext page

Converts a date value into a string in a specific format.

 

Syntax

DateStr(dDate, cFormat)

 

Argument

dDate

Date to be converted

cFormat

'ymd'        year in 4 digits, month in 2 digits, date in 2 digits

'mdy'        month in 2 digits, date in 2 digits, year in 4 digits

'dmy'        date in 2 digits, month in 2 digits, year in 4 digits

 

Returns

Character (10 digits)

 

Example

For the race on the first of October in 2009:

Function

Return Value

DateStr(HrDate(), 'ymd')

'2009/10/01'

DateStr(HrDate(), 'dmy')

'01/10/2009'

DateStr(HrDate(), 'mdy')

'10/01/2009'

 

 


Page url: http://www.racematenet.com/english/help/index.html?datestr.htm