Hi All,
need vb.net code to convert from string to date
for example : Tuesday, September 19 by 7:00 P.M
output: 09/19/2023 19:00.
Thanks,
Veera
Hi All,
need vb.net code to convert from string to date
for example : Tuesday, September 19 by 7:00 P.M
output: 09/19/2023 19:00.
Thanks,
Veera
Hi @veeramani.shanmugam ,
Cdate(yourString).Tostring(âMM/dd/yyyy hh:mm ttâ)
regards,
Thanks for your quick help. But getting below error
Cdate(âSeptember 19 by 7:00 P.Mâ).Tostring(âMM/dd/yyyy hh:mm ttâ)
Assign: Expression Activity type âVisualBasicValue`1â requires compilation in order to run. Please ensure that the workflow has been compiled.
DateTime.ParseExact(âTuesday, September 19 by 7:00 P.Mâ, âdddd, MMMM d âbyâ h:mm ttâ, System.Globalization.CultureInfo.InvariantCulture).ToString(âMM/dd/yyyy HH:mmâ)
Hi,
Can you try the following expression?
DateTime.ParseExact(yourString.Replace(".",""),"dddd, MMMM d \b\y h:m tt",System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy HH:mm")
Regards,
@Yoichi - Thanks a lot
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.