All Forums Tools
Caleks 2 posts Joined 12/05
24 Aug 2006
Date format conversion

Pls help: Does anyone know how to convert the following date format into YYYY-MM-DD?Eg.:I need to convert 01-OCT-06 into 2006-10-01.Im building an Insert statement on Mload script on Unix plataform.

Fred 1096 posts Joined 08/04
24 Aug 2006

One possibility would be CAST(:fld AS DATE FORMAT 'DD-MMM-YY') but whether or not that does what you want depends on Century Break setting (those pesky two-digit years!). And since Century Break is a global setting for the entire machine...You may need to insert the century digits ("20") before doing the CAST with FORMAT 'DD-MMM-YYYY'. That could be done prior to the MLOAD, on the client side during the MLOAD using a "field expression" in a .FIELD statement, or on the database side inside the CAST.

You must sign in to leave a comment.