Page 1 of 1

using date_from_string function in modify stage

Posted: Sat Nov 05, 2005 7:56 am
by balajisr
Hi

I have input data Datestring as string to the modify stage in the format "05112005"(ddmmyyyy)

Using modify stage i need to convert the Datestring to date 11-05-2005(mm-dd-yyyy).

In the specification property of modify stage i type:

Newdate:date = date_from_string[%dd%mm%yyyy](Datestring)

The result being date converted as "2005-11-05"(yyyy-mm-dd) which is the default format of datastage

Is there any way i can convert date in one format to another format other than yyyy-mm-dd using date_from_string function using modify stage.

Thanks
Balaji

Re: using date_from_string function in modify stage

Posted: Mon Nov 07, 2005 6:31 am
by sudarshan
Hi Balajisr,

If you go to EDIT->PROPERTIES and edit the job properties in the Defaults tab you can find the default date and time formats used for the job. There u can set your specific format to be used for the job.

:)
Sudarshan

Posted: Mon Nov 07, 2005 6:59 am
by balajisr
Hi

Thanks for your reply.

That is correct. I want to know whether we can override the default date format say i have three date columns and i want each date column to have different date format.Is this possible in modify stage?

Thanks
Balaji

Posted: Mon Nov 07, 2005 7:46 am
by sudarshan
Hey,

Can u plss explain what use it will be to store three date fields in three different formats unless u r storing em as string ... because, whichever database u use will ultimately write to will store em in only one format. So, can u plss specify the datatypes u r abt to use, ur target and what exactly u want to achieve.

:)
Sudarshan