str2Datetime Function:
Generates a utcdatetime value from the specified string of date and time information.
utcdatetime str2datetime( str text, int sequence )
The syntax requirements for the date portion of the text parameter are flexible. The variety of valid formats is the same as in the date2str function.
Each of the following calls to str2datetime is valid and produce the same output:
utc3 = str2datetime( "1985/02/25 23:04:59" ,321 ); utc3 = str2datetime( "Feb-1985-25 11:04:59 pm" ,231 ); utc3 = str2datetime( "2 25 1985 11:04:59 pm" ,123 );
Each component of the date time is represented by a digit in the sequence parameter:
- 1 – day
- 2 – month
- 3 – year
For example, YMD is 321. All valid values contain each of these three digits exactly one time. If the value of the sequence parameter is invalid, the regional settings are used to interpret the input text parameter.
If the input parameters describe an invalid date and time, an empty string is returned.
No comments:
Post a Comment
Your comment will be appreciated.