How to Date Convert “Date” to “System date” format?
Date SystemDate Formate:
1-Feb-22 - 01-02-2022
2-Feb-22 - 02-02-2022
3-Feb-22 - 03-02-2022
4-Feb-22 - 04-02-2022
5-Feb-22 - 05-02-2022
6-Feb-22 - 06-02-2022
7-Feb-22 - 07-02-2022
8-Feb-22 - 08-02-2022
9-Feb-22 - 09-02-2022
10-Feb-22 - 10-02-2022
11-Feb-22 - 11-02-2022
12-Feb-22 - 12-02-2022
13-Feb-22 - 13-02-2022
Thanks in advance…
Gokul001
(Gokul Balaji)
February 23, 2022, 4:43am
2
HI @Ashok_kumar7
You can try with this method
CDate(“10-Feb-22”).ToString(“dd-MM-yyyy”)
Regards
1 Like
Hi!
Try this:
Cdate(DateVariable).ToString("dd-mm-yyyy")
Reference:
Regards,
NaNi
1 Like
Hi @Ashok_kumar7 To convert exactly to ur system date
Indeed it was checking the Region set in Control Panel.
I think I found a better solution: In Registry Editor Under HKEY_CURRENT_USER/Control Panel/International
You have the date and time format of the machine.
For example if you want to get the ShortDate then you need an assign activity:
string shortDateFormat = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(“Control Panel\International”).GetValue(“sShortDate”)
Others values you can use there are: sShortTime, sTimeFormat, sLongDate etc.
please refer above link
Thanks
1 Like
Yes I tried this method in my project but
i need to convert
1-Feb-22 - 01-02-2022
2-Feb-22 - 02-02-2022
3-Feb-22 - 03-02-2022
4-Feb-22 - 04-02-2022
5-Feb-22 - 05-02-2022
6-Feb-22 - 06-02-2022
7-Feb-22 - 07-02-2022
8-Feb-22 - 08-02-2022
9-Feb-22 - 09-02-2022
Pdf File Contains these formate but i want to change as system date format like “dd-MM-yyyy”
Thanks
Gokul001
(Gokul Balaji)
February 23, 2022, 4:46am
6
Or you can use this too
Datetime.ParseExact(“1-Feb-2022”,“d-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MM-yyyy”)
Regards
Gokul
2 Likes
wow super… I got this Solution… Thank You so much @Gokul001
but when Date Changes format
8-Feb-22 - 08-02-2022
9-Feb-22 - 09-02-2022
10-Feb-22 - 10-02-2022
Again i have to change date Format
Datetime.ParseExact(“1-Feb-2022”,“d-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MM-yyyy”)
Datetime.ParseExact(“10-Feb-2022”,“dd-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MM-yyyy”)
Gokul001
(Gokul Balaji)
February 23, 2022, 4:51am
11
NO Need of that it will automatically convert with the same format
Regards
Gokul
1 Like
okay Thank you so much for this Mr @Gokul001
I will try it in my project
1 Like
Thank you So much @THIRU_NANI
1 Like
system
(system)
Closed
February 27, 2022, 8:28am
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.