Hi ,
I have source format like 1456(2007-10-01) and in target i want to populate date as 20071001.
I have gone through the search but i didn't.
Thanks,
Harikumar
date conversion
Moderators: chulett, rschirm, roy
date conversion
Last edited by harikumar on Thu Sep 22, 2011 1:16 am, edited 1 time in total.
-
- Participant
- Posts: 47
- Joined: Thu Oct 04, 2007 3:37 am
- Location: chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You have to extract the date portion from the input string, perhaps using substring if the size is constant or Field() functions otherwise. Then all you need to do is to convert the hyphen characters to empty string ("") in the result.
Code: Select all
Convert("-", "", Field(Field(InLink.TheString, ")", 1, 1), "(", 2, 1))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
date conversion
I have choosed mistakenly server edition but this prob related to parllel editionpremupdate wrote:Have you tried OCONV function..
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: date conversion
Hello harikumar,
Is your input value a date-format as shown in the view-data grid of for example a DB2-stage (even though I would expect the numeric value to be 14519 then)?
If your column is in date-format you can convert it using DateToString(%date%,"%yyyy%mm%dd"). This will return the string '20071001' (not a date).
Is your input value a date-format as shown in the view-data grid of for example a DB2-stage (even though I would expect the numeric value to be 14519 then)?
If your column is in date-format you can convert it using DateToString(%date%,"%yyyy%mm%dd"). This will return the string '20071001' (not a date).
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
There are the grateful those are happy." Francis Bacon