Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody,
I need to show ‘Date of visit’ >= ‘Refresh Date’ AND ‘Date of visit’ < ‘Refresh Date + 90 days’
for this I have written the code as
date
([Date of Visit],'dd/MM/yyyy')>= date(ReloadTime()) and [Date of Visit] < Month(AddMonths(date(ReloadTime()),+3));
But it's not showing any data.
Could any one please help.
Urgent.
Thanks in Advanse
Ashish
Message was edited by: ashish das
ReloadTime() is giving you TimeStamp so you need to use something like below
Date(Floor(ReloadTime()))
or
Date(Floor(ReloadTime()),'DD/MM/YYYY')
Also, use DD/MM/YYYY instead of dd/MM/yyyy.
Hi Manish,
Thanks for your reply.
Using thebelow code also am getting Null.
date
([Date of Visit],'dd/mm/yyyy')>= date(Floor(ReloadTime()),'dd/mm/yyyy') and ([Date of Visit]) < Month(AddMonths(date(Floor(ReloadTime()),'dd/mm/yyyy'),+3))
where as using
month
(AddMonths(Date(Floor(ReloadTime()),'DD/MM/YYYY'),+3))
am getting the value as Jul which is correct.
Could you please tell me whats wrong in my code.
Many Thanks
Ashish
Provide Sample data if possible..
Hi Manish,
Please find the attached sample file.
Thanks
What you want as end result?
The aggregation functions missing here...
i.e. SUM, AVG, Min, Max ...
Hi Manish,
I just want to filter out the data with the ‘Date of visit’ >= ‘Refresh Date’ AND ‘Date of visit’ < ‘Refresh Date + 90 days’.
In script I put the below where condition and loaded it. But it was giving me zero records.
date([Date of Visit],'dd/mm/yyyy')>= date(Floor(ReloadTime()),'dd/mm/yyyy') and ([Date of Visit]) < Month(AddMonths(date(Floor(ReloadTime()),'dd/mm/yyyy'),+3))
hi,
IF(
Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))) >= Date(Floor(ReloadTime())) and
Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))) < Date(Floor(TimeStamp(AddMonths(ReloadTime(),3)))),
Date(Floor(Timestamp#([Date of Visit],'YYYY-MM-DD hh:mm:ss'))))