Date Comparison
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I want to compare dates which is in a string format because the date time format is not fixed.
I am using simple >= logic but it is not working.
date1, date2, and date3 are the three columns but when they are equal it is validating but when they are not equal they are not validating.
Please suggest me some workflow.
Note: Date format is not fixed
Solved! Go to Solution.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you at least give us some sample data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @vijaylnyadav,
I would create a new column with the proper date format and keep the original one.
The new one would be used for calculations but you can remove it along the way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @Qiu please find below the attached data.
Condition:
Date 1 <= Date 2 <= Date 3.
Date 1 | Date 2 | Date 3 |
29-May-19 | 29-May-19 | 4-Jun-19 |
28-May-19 | 28-May-19 | 24-Jun-19 |
24-Apr-15 | 24-Apr-15 | 1-May-15 |
29/8/11 | 29-Sep-17 | 10/30/17 |
27-Oct-14 | 27-Oct-14 | 10-Nov-14 |
17-Jun-19 | 17-Jun-19 | 3-Jul-19 |
30-11-2017 | 30-Nov-17 | 12/01/2017 |
17-Jun-19 | 17-Jun-19 | 3-Jul-19 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Emil_Kos
Please refer the following sample data.
because the previous i am getting null in the correct date columns.
This is the sample data receiving from user
Date 1 | Date 2 | Date 3 |
8-Oct-09 | 8-Oct-09 | 8-Oct-09 |
21-May-19 | 21-May-19 | 10-Jun-19 |
6-Dec-18 | 6-Dec-18 | 21-Dec-18 |
29-May-19 | 29-May-19 | 18-Jun-19 |
2-Aug-17 | 2-Aug-17 | 16-Aug-17 |
25-Feb-15 | 25-Feb-15 | 12-Mar-15 |
17-Jun-19 | 17-Jun-19 | 17-Jun-19 |
29-Jan-18 | 29-Jan-18 | 29-Jan-18 |
6/26/2018 | 6/26/2018 | 6/26/2018 |
5/19/2017 | 5/19/2017 | 5/19/2017 |
5/8/2017 | 5/8/2017 | 5/8/2017 |
5/9/2017 | 5/9/2017 | 5/9/2017 |
7/21/2017 | 7/21/2017 | 7/21/2017 |
7-Mar-08 | 7-Mar-08 | 7-Mar-08 |
1-Oct-03 | 1-Oct-03 | 1-Oct-03 |
7-Aug-07 | 7-Aug-07 | 7-Aug-07 |
13-Mar-14 | 13-Mar-14 | 20-Mar-14 |
27-Aug-12 | 27-Aug-12 | 12-Oct-15 |
27-Aug-12 | 27-Aug-12 | 27-Aug-12 |
11-Nov-08 | 11-Nov-08 | 24-Dec-19 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thankyou @Emil_Kos for this solution.
But what if the user uses another format other than.
Should i use every format instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @vijaylnyadav,
you are not able to Force the user to use one format? The truth is there is always a risk of messing up a month with date.
if that is possible I would force the user to fill this in one format or at least educate them about preferred format.
