Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Random date display.

How to display random date which occurs for  next 365 days.

Thanks in advance.

4 Replies
sunny_talwar

Try this:

=Date(Today() + Floor(Rand() * 365))

EDIT:

or this in the script:

Date(Today() + Floor(Rand() * 365)) as FutureDates

MK_QSL
MVP
MVP

LOAD

  Date(Floor(Rand() * 365 + Today())) as Date

AutoGenerate 10000;

EDIT

LOAD

  Date(Today() + Floor(RAND()*(AddYears(Today(),1) - Today() + 1))) as InvoiceDate

AutoGenerate 10000;

Kushal_Chawda

Try,

Load

date(RecNo()-1+Floor(Today())) As Date

AutoGenerate(365);

maxgro
MVP
MVP

load

  date(today()+floor(rand()*365)+1) as next365date

AutoGenerate 1000;