davemitra
(Davemitra2)
September 18, 2020, 9:32am
1
Hi,
I have a business requirement where i need to check whether date is more than 3 months or not.
So, there is a webpage from where i will get the date details, i need to fetch every date one by one and check if its more than 3 months or not.
Issue is that date format different sometimes.
Sometimes it shows Unknown.
Please see the below screenshots for your reference.
How will I check these dates and verify if its more than 3 months or not.
Please suggest on this one.
davemitra
(Davemitra2)
September 18, 2020, 12:02pm
3
Can you please elaborate more on this and how will I use this ?
as you can see the date can appear as for exp, May 12, 2019 or yesterday or today something like that.
So need to know how will i use this here ?
Srini84
(Srinivas)
September 19, 2020, 9:54am
4
Matt_S
(Matt S)
September 19, 2020, 1:10pm
5
Say the date format is different when the date is:
Unknown
Yesterday
ANy others?
If the exceptions are only the 2 above, then you can skip or set a date value for those to compare in your code. for example if contains yesterday, then Date= DateTime.Now.AddDays(-1).tostring(“format”).
1 Like
Tried with Regex and if Condition.
dates.xaml (7.0 KB)