bobby
(Bob Master)
December 2, 2019, 5:03pm
1
I get a date from excel and store it into a string. Once in a string, I convert it into a DateTime object. But I want to set up an if condition to check if the value is a date then convert it. Not sure how to check if the value is a date.
Can anyone help?
1 Like
Have created a workflow based on your requirement.
Please mark as this solution if it is resolved.
DateFormat.zip (24.2 KB)
1 Like
If suppose your DateTime value is stored in a str_datetime which is format “dd/MM/yyyy hh:mm:ss” then use this expression in a IF condition
Date.TryParseExact(str_datetime.ToString.SubString(0,10),“dd/MM/yyyy”,Nothing,Globalization.DateTimeStyles.None,Nothing)
Cheers @bobby
6 Likes
bobby
(Bob Master)
December 3, 2019, 9:12am
6
I got it working. Thanks @Palaniyappan . Also, thanks for taking the time to answer my question. @Mohansadaiyapillai and @KarthikByggari . Great suggestions as well.
Thanks guys.
2 Likes
system
(system)
Closed
December 6, 2019, 9:12am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.