Aditipatil
(Aditi Patil)
February 21, 2018, 11:05am
1
Hi All,
I have extracted the time stamp of the outlook mail , I want it in a specific format of date dd-MMM-yyy
When I tried changing as str.ToString(dd-MMM-yyy) exception occurred same happen with Fomat activity as well .
Please help with some solution.
Rgds,
Aditi
arivu96
(Arivazhagan A)
February 21, 2018, 11:11am
2
Hi @Aditipatil ,
Try this one,
your string value strValue and format is “dd/MM/yyyy” (based on your format give)
DateTime.ParseExact(strValue.ToString(),"dd/MM/yyyy",Globalization.CultureInfo.InvariantCulture).ToString("dd-MMM-yyyy")
Regards,
Arivu
MAHESH1
(MAHESHKUMAR JV)
February 21, 2018, 11:13am
3
@Aditipatil
Try this
first convert to datetime and then convert to string by giving .Tostring(“dd-MMM-yyyy”)
I think there is no format with 3 characters in year, either you can get like yy or yyyy
Regards,
Mahesh
hkjobs1988
(Hitshs Kumar)
February 21, 2018, 11:14am
4
I had similar requirement I did below , check if it works out for you.
1 Like
arivu96
(Arivazhagan A)
February 21, 2018, 11:16am
5
Hi @hkjobs1988
“dd/MM/yyyy” instead of this you can pass your input string format.
“dd-MMM-yyyy” instead of this you can use what format you want.
Regards,
Arivu
1 Like
Aditipatil
(Aditi Patil)
February 21, 2018, 3:02pm
6
Thanks all for response and help
Rgds
Aditi