Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
on one of my dashboards I use demo data.. I always face the issue that since I dont update the data the the date column info fails all in the past.. while i need it to always have the dates above today's year and under today's year + 5.
trying to find a logic to use within the script so any date prior to today will change to random future date..
Any one has used that in the past or has an idea?
Hi Badr
I would use a resident load on your demo data using the below script.
Date(IF(Date < Today(), Ceil(Rand()*365)+Today(), Date)) as NewDate
You can manipulate the 365 depending on how far in the future you want to go. The you can use NewDate as your date.
Kind Regards
Something like:
if(YourDate< Today(),makedate(year(Today())*Ceil(5*rand()),Ceil(12*rand()),Ceil(28*rand())), YourDate) as YourDateField