All Products
Search
Document Center

String-to-date conversion rules

Last Updated: Jun 18, 2021

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.