How to convert date format (dd/mm/yyyy) to (mm/dd/yyyy)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-12-19 05:31 PM
Hi Team,
Can anyone help me to achieve this date conversion (dd/mm/yyyy) to (MM/dd/yyyy)
------------------------------
Prasanth Chirukuri
RPA Developer
iOPEX Technologies
Asia/Kolkata
------------------------------
Can anyone help me to achieve this date conversion (dd/mm/yyyy) to (MM/dd/yyyy)
------------------------------
Prasanth Chirukuri
RPA Developer
iOPEX Technologies
Asia/Kolkata
------------------------------
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-12-19 06:37 AM
Assuming:
1- Input format is of String
2- The input format is fixed to be "dd/mm/yyyy"
Solution:
FormatDate(MakeDate(Mid("24/10/2019", 1, 2), Mid("24/10/2019", 4, 2), Mid("24/10/2019", 7,4)), "MM/dd/yyyy")
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
+6594554364
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------
1- Input format is of String
2- The input format is fixed to be "dd/mm/yyyy"
Solution:
FormatDate(MakeDate(Mid("24/10/2019", 1, 2), Mid("24/10/2019", 4, 2), Mid("24/10/2019", 7,4)), "MM/dd/yyyy")
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
+6594554364
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-12-19 10:55 AM
Hi Vivek,
Thank you for your quick response.
We can solve this using Date and time manipulation VBO Format date action Input - Pass as date formate like-2/23/2019 2nd input give date format mm/dd/yyyy.
------------------------------
Prasanth Chirukuri
RPA Developer
iOPEX Technologies
Asia/Kolkata
------------------------------
Thank you for your quick response.
We can solve this using Date and time manipulation VBO Format date action Input - Pass as date formate like-2/23/2019 2nd input give date format mm/dd/yyyy.
------------------------------
Prasanth Chirukuri
RPA Developer
iOPEX Technologies
Asia/Kolkata
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-12-19 02:27 AM
Hi prashant,
Remember, "Format Date" only works if your input is a "DateTime" . If your input is a string, then essentially you will have to convert the string to date time using string manipulation and then use format date which is similar to the one liner I provided in my earlier reply.
But if your input is already in datetime, then your solution will work perfectly. Kudos
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------
Remember, "Format Date" only works if your input is a "DateTime" . If your input is a string, then essentially you will have to convert the string to date time using string manipulation and then use format date which is similar to the one liner I provided in my earlier reply.
But if your input is already in datetime, then your solution will work perfectly. Kudos
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-12-19 10:10 AM
Please be aware of different behavior of FormatDate depending on your regional settings in Windows.
Below is the result of non-English date format settings in Windows and format vs resulting string.
Below is the result of non-English date format settings in Windows and format vs resulting string.
------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-01-23 10:14 PM
May I suggest a less complicated approach?
Use the Import the Pre-Configured Utility- Date and Time Manipulation Business Object and simply enter the preferred format of your date as shown in the picture. It works like a charm. The example below will convert 2/6/2023 to 06/02/2023.
------------------------------
Awoyinka Daramola
------------------------------
Use the Import the Pre-Configured Utility- Date and Time Manipulation Business Object and simply enter the preferred format of your date as shown in the picture. It works like a charm. The example below will convert 2/6/2023 to 06/02/2023.
------------------------------
Awoyinka Daramola
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
30-01-23 08:09 AM
...interesting, thanks for pointing that out.
------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)
Paul, Sweden
(By all means, do not mark this as the best answer!)