String-to-date conversion rules

2023-08-18 09:26:34  Updated

The following conversion rules govern the conversion from a string value to a date value:

  • If you specify all numeric values for numeric format elements, including leading zeros, you can omit punctuation marks contained in the format string from the date string. Specify 02 instead of 2 for the two-digit format elements such as MM, DD, and YY.

  • You can omit time fields found at the end of the format string from the date string.

  • You can use any non-alphanumeric character in the date string to match the punctuation mark in the format string.

Contact Us