cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

String dates stopped working

vijaychand_k
Newcomer
0 Likes
385

Hi Community,
I have a question in webI report
for example: I have
1. date 1 in date/time format from the universe. create a variable on top of this like =FormatDate([Plan Date];"Mmm-yyyy").this column dates ranges from Jan-2020 to Apr-2030.
2. start date =FormatDate(ToDate("01/Sep/2016"; "dd/MMM/yyyy"); "Mmm-yyyy")
3. end date=If (ToNumber(FormatDate(CurrentDate(); "dd")) <= 15) Then FormatDate(RelativeDate(CurrentDate(); --2; MonthPeriod ); "Mmm-yyyy") Else FormatDate(RelativeDate(CurrentDate(); -1; MonthPeriod ); "Mmm-yyyy")

Now i am comparing these string dates.
If this condition satisfies then display 1 else 0.
[date 1] >= [start date] And [date 1] <= [end date].
This variable works perfectly until end date='Sept-2025'. Its displays 1 from Jan-2020 to Sept-2025.
When end date='Oct-2025'(considering today is Dec 4,2025), then 1 is displayed from Jan-2020 to Oct-2025 & Feb 2027-Oct-2027 also. the expectation is that the value is 0 if end date >Oct-2025.
What may be the reason? This string comparison is correct until last month and got failed in current month. 
Thanks in advance for help.

Accepted Solutions (0)

Answers (0)