How to Format the Soap Timestamp Date properly?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
30-04-21 07:29 AM
Dear Team,
I am unable to format the timestamp to datetime.
I used below logics to get the sopaui timestamp format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
FormatUTCDateTime(Now(); "yyyy-MM-dd")&"T"&FormatUTCDateTime(Now(); "HH:mm:ss")&"Z"
FormatUTCDateTime(Now(); "yyyy-MM-dd'T'HH:mm:ss'Z'"
But the output format is interms of text which is throwing a date parse exception when send it through my request.
I also used a code stage to get the work done but unfortunately, i didnt work.
Dim MS
MS = format(Now,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
Console.WriteLine(MS)
Please suggest a way to handle this exception. Any help would be highly appreciated.
I am unable to format the timestamp to datetime.
I used below logics to get the sopaui timestamp format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
FormatUTCDateTime(Now(); "yyyy-MM-dd")&"T"&FormatUTCDateTime(Now(); "HH:mm:ss")&"Z"
FormatUTCDateTime(Now(); "yyyy-MM-dd'T'HH:mm:ss'Z'"
But the output format is interms of text which is throwing a date parse exception when send it through my request.
I also used a code stage to get the work done but unfortunately, i didnt work.
Dim MS
MS = format(Now,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
Console.WriteLine(MS)
Please suggest a way to handle this exception. Any help would be highly appreciated.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-05-21 01:13 AM
Hello Subha
Code Stage should work fine in this case. I would suggest you to declare the MS variable with the data type as below
Dim MS as datetime
MS = format(Now,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
After this, MS would be treated as a datetime variable and not text. Please let me know in case you have any other query.
Code Stage should work fine in this case. I would suggest you to declare the MS variable with the data type as below
Dim MS as datetime
MS = format(Now,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
After this, MS would be treated as a datetime variable and not text. Please let me know in case you have any other query.
