Hi,
I search and read many Threads in this forum but I could not resolve my problem, Please help me....
I am using Currentdate as one of my column in Transformer which is in %yyyy-%mm-%dd format BUT I reqired in %mm/%dd/%yyyy format :
I am doing(in Transformaer) :
DateToString(CurrentDate(),"%mm%dd%yyyy")=string
StringToDate(StageVar1,"%mm%dd%yyyy")=current_dt
But that is not working pleases help me.
Thanks
Dateformat from Currentdate
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
First, CurrentDate() returns a date. There is no format.
When you use DateToString() you can specify a format.
Derivation expressions do not contain "=" characters to assign values. Try just as the derivation of the current_dt field/stage variable.
When you use DateToString() you can specify a format.
Derivation expressions do not contain "=" characters to assign values. Try just
Code: Select all
DateToString(CurrentDate(), "%mm/%dd/%yyyy")
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Then don't apply a DateToString() function. Just assign CurrentDate() to this column.
You can change the display format (but not the storage format, which is "date") by selecting this row in the Columns grid, right click, choose Edit Row, and provide the date format string there.
If you want all dates processed by the stage to be mm/dd/yyyy format you can change the stage properties instead.
You can change the display format (but not the storage format, which is "date") by selecting this row in the Columns grid, right click, choose Edit Row, and provide the date format string there.
If you want all dates processed by the stage to be mm/dd/yyyy format you can change the stage properties instead.
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.