STR2DATE Function


Function Type

Predefined function

Syntax

STR2DATE( <dateString>, <dateFormat> )

Description

Converts a formatted date string to a Date data type value that matches the date format of the second argument.

Argument

Description

<dateString>

Formatted date string.

<dateFormat>

String representing the <dateString> date format.

Warning

Important

<dateFormat> must match the original data type.

See date/time formats (explained in the Formats tab) for information on date/time format patterns.

Returns

Date

Example

This example converts a string in the supplied format into a data object. It returns a date object representing 1/24/1975.

STR2DATE("01/24/1975", "MM/dd/yyyy")


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Data Studio Help