Good Morning,
I have a date field that shows the month and year , but the format is that way, " 12016 " but I want to show this way " 012016 " as include 0 left on the date ? I use the transformer the clause " Cats ( Oconv ( DataAtual , " DM [ 2 ] " ) , Oconv ( DataAtual , " DY "[4] ) ) " to generate the data .
thank you.
HOW CONCAT "0 " IN MONTH TRANSFORMER
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Thu Feb 25, 2016 9:12 am
Cats?
Why not just do it all at once?
Now, that's off the top of my dusty head but should get you pretty close. That may leave a space between the two but you can use Convert to remove it.
Why not just do it all at once?
Code: Select all
Oconv (DataAtual, "DMY", "[2,4]")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 4
- Joined: Thu Feb 25, 2016 9:12 am
-
- Participant
- Posts: 4
- Joined: Thu Feb 25, 2016 9:12 am
We know what you need. What is your target data type? It needs to be a string and I suspect you are putting it into a number which strips the 'not significant' leading zero. If you are using a string then post the actual code you are using, copy/paste from the transformer (don't hand type it).
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 4
- Joined: Thu Feb 25, 2016 9:12 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Oconv(DateActual, "DMY[2,4]" : @VM : "MCN")
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.