I have date and time ( 18 MAY 2018 03:00) in the string variable that i have to change to 05/18/2018 without time and assign in the string variable


#1

I have date and time ( 18 MAY 2018 03:00) in the string variable that i have to change to 05/18/2018 without time and assign in the string variable, i tried many ways but unable to get the right one, could any one please help me ?


#2

@venkat1 You can use variable.ToString(“MM/dd/yyyy”). See attached workflow :slight_smile:

Date and time.xaml (5.6 KB)


#3

HI @venkat1,

Try this

strDate=“18 MAY 2018 03:00”
strResult= Convert.ToDateTime (strDate).ToString(“MM/dd/yyyy”)

Regards
Balamurugan


#4

Thanks to all, it is working fine and gets the result as i am looking for…