Does anyone know what kind of date this is “2022-07-28T09:04:13.183Z” ?
How can I get it from a Datetime.now?
Hey!
Have a view on this docs
Regards,
NaNi
Thanks for the tip, I hadn’t seen this document yet, if the document has the answer, I’ll put it as resolved
Hey!
You can find the more info here
Regards,
NaNi
Hi @Rui_Cruz2
Format of the Date
2022 - Year (yyyy)
07 - Month (MM)
28 - Date (dd)
T - Long time pattern
09:04:13 - HH:mm:ss
183Z - ToUniversalTime ( SSS Z)
Regards
Gokul
Does this format have a name or can I convert dateTime to tis format automatic
Hey!
If you’re getting the data in that format we can convert that to required format…
Try like this:
Datetime.ParseExact(Strinput.ToString, "yyyy-MM-ddTHH:mm:ss.fffZ", System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy hh:mm:ss")
Where: yyyy-MM-ddTHH:mm:ss.fffZ is the input format
dd/MM/yyyy is the Output format
You can change this according to your requirement
Regards,
NaNi
CDate("2022-07-28T09:04:13.183Z").ToString("MM/dd/yyyy")
Regards
Gokul
Hi,
FYI, the following return the above format datetime.
DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
OR
d = DateTime.Now
Then,
d.ToUniversalTime.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
Regards,
I’m sorry if my english isn’t better but I wanted the opposite
Can you tell me the output format @Rui_Cruz2
Does not work its not same
This is my input
and I want my output format “2022-07-28T09:04:13.183Z”
Note:date is wrong it is just sample
Hey!
Try this:
Datetime.ParseExact(Strinput.ToString, "dd/MM/yyyy hh:mm:tt", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
Regards,
NaNi
Hi @Rui_Cruz2
How about this expression
CDate("2022-07-28").ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
Or
DateTime.ParseExact("2022-07-28", "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
Regards
Gokul
Thank you
I wanted something automatic like “Datetime.now.toOthertime” format but maybe there is no such solution
Thanks to the 3 for your patience
@THIRU_NANI @Gokul001 @Yoichi
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.