String to date format

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
samuel.rajesh
Participant
Posts: 15
Joined: Fri May 13, 2005 2:35 am

String to date format

Post by samuel.rajesh »

Hi ,

Am converting a string to date using the below transformer function (StringToDate(Lnk_Transaction_Read.ORDR_VLE_DT,"%yyyy%mm%dd"),
However the output is the following format "YYYY-MM-DD" how do i remove the "-" ,thanks in advance .


Sam
edison
Participant
Posts: 19
Joined: Mon Sep 17, 2007 4:28 pm

Re: String to date format

Post by edison »

samuel.rajesh wrote:Hi ,

Am converting a string to date using the below transformer function (StringToDate(Lnk_Transaction_Read.ORDR_VLE_DT,"%yyyy%mm%dd"),
However the output is the following format "YYYY-MM-DD" how do i remove the "-" ,thanks in advance .
by using e-replace command u can do that right,go in the help and write e-replace u will get clear idea to remove"-"

Sam
Nokia8800
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need to remove the "-" characters - display of dates is governed by the default date format string you have defined. When Date data types are written to database tables, they are loaded as type Date; display format is ignored. If you are writing to a text file, don't use the Date data type, and simply trim the "-" characters from the string using Trim() or Convert() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mcs_murali83
Participant
Posts: 23
Joined: Sat Sep 29, 2007 6:05 am
Location: Datastage
Contact:

Remove " " (double quotes)

Post by mcs_murali83 »

Hi,

If you want to remove the double quotes, while u r importing the meta data
into your repository folder, a window pops up. In that specify " (double quotes) in that box.

(i.e) quote "
Murali
Post Reply