Timestamp
Moderators: chulett, rschirm, roy
Sorry for not getting back soonchulett wrote:You use the 'T' for MS-SQL? I've only seen it for XML timestamps.
We can sit here and guess all day. I prefer to wait for the Shilpa to come back and clarify what exactly is needed. And what the target is.
My question was I need to populate the timestamp with the above format
'T' should come inbetween date and time.
I am genertaing XML file and there is no source column mapping to the target .
Yes, ur right , this is for XML timestamps for header information.
If I would like to do the same conversion in PX its the same or different.
Thanks as lot for the quick response.
What do you need in this timestamp? One consistent value over the run of the job? Something that changes over the course of the run? Same basic answer but with a slightly different approach.
In any case, you'll need to build a routine to get the system date/time and put it in a timestamp format. Then for an 'XML timestamp' you'll need to ensure there's a 'T' rather than a space between the two components. You can either build it that way or build a 'normal' timestamp and then swap the space for a 'T' - Madhusv has shown one way to do that.
Then define a stage variable and call the routine in the Initial Value of the variable if you want it to be a constant. Or use it directly in the derivation of your output column for a changing value.
In any case, you'll need to build a routine to get the system date/time and put it in a timestamp format. Then for an 'XML timestamp' you'll need to ensure there's a 'T' rather than a space between the two components. You can either build it that way or build a 'normal' timestamp and then swap the space for a 'T' - Madhusv has shown one way to do that.
Then define a stage variable and call the routine in the Initial Value of the variable if you want it to be a constant. Or use it directly in the derivation of your output column for a changing value.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I am not able to populate the same format of date in PX. Iwas able to do it in Server using Iconv and Oconv and convert functionsDSguru2B wrote:What exactly is not working
2007-03-20T09:21:22
I changed the sqltype to varchar but still its not populating T inbetween date and time
I have used simple way to do that CurrentDate():'T':CurrentTime()
Thanks,
Thats what your doing wrong. CurrentDate() and CurrentTime() will return date and time and not a string. Try something like
Code: Select all
DateToString(CurrentDate()):'T':TimeToString(CurrentTime())
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
It worked Guru. :DDSguru2B wrote:Thats what your doing wrong. CurrentDate() and CurrentTime() will return date and time and not a string. Try something likeCode: Select all
DateToString(CurrentDate()):'T':TimeToString(CurrentTime())
Thanks to all of them for helping me out to resolve the issue