Hi,
This was my string from the excel, str1= “22/11/2019 23:59:43.642 GMT”, str2 = “18-Nov-19”, str3=“53:48.7”
I have to convert str1 as datetime1 and str4 as datetime2 with the format of (dd/MM/yyyy hh:mm:ss), (i.e.str4= str2 + str3).
And check datetime1 > datetime2.
Please help to crack this if possible.
Thanks & Regards,
@Spark_robot
kuppu_samy
(Kuppusamy)
December 18, 2019, 6:22am
2
Hi @Spark_robot ,
What format has str3 . Couldn’t recognize it.
Spark_robot:
str3=“53:48.7”
kuppu_samy
(Kuppusamy)
December 18, 2019, 7:27am
4
Hi @Spark_robot ,
Please refer the below code.
DateTime1 = DateTime.ParseExact(Str1,"dd/MM/yyyy HH:mm:ss.fff GMT",Nothing)
DateTime2 = DateTime.ParseExact(Str2+" "+Str3,"dd-MMM-yy HH:mm:ss.f",Nothing)
Refer below screenshot for comparision,
2 Likes
Hi @kuppu_samy
Thank you very much. Your code working fine.
Regards,
@Spark_robot
1 Like
system
(system)
Closed
December 21, 2019, 10:35am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.