<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Generate random dates between a Start Date and End Date variables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107614#M637057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish had the computing power to go to a level where the test might give more conclusive results. But just based on a 'SINGLE SMALL' sample test &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I deduced that Stefan is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I being a good statistician? No.&lt;/P&gt;&lt;P&gt;Am I being a good friend? Hell Ya!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2016 20:35:03 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-19T20:35:03Z</dc:date>
    <item>
      <title>How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107605#M637048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two variables where users can input a start date and end date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's called it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartDate&lt;/P&gt;&lt;P&gt;vEndDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I may have a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Payments:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;PaymentID,&lt;/P&gt;&lt;P&gt;&amp;lt;Create payment date based on vStartDatr and vEndDate here&amp;gt; PaymentDate,&lt;/P&gt;&lt;P&gt;CustomerID,&lt;/P&gt;&lt;P&gt;ProductID&lt;/P&gt;&lt;P&gt;AutoGenerate 300;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the PaymentDate to have a date randomly generated from the vStartDate and vEndDate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 15:24:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107605#M637048</guid>
      <dc:creator>mwallman</dc:creator>
      <dc:date>2016-05-19T15:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107606#M637049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Date($(vStartDate) + Ceil(Rand() * ($(vEndDate) - &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(&lt;/SPAN&gt;vStartDate)))) as PaymentDate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 15:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107606#M637049</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T15:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107607#M637050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get an equal chance to create dates in your range, try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Date($(vStartDate)+ Round(Rand() * ($(vEndDate) - $(vStartDate)+1)-0.5)) as PaymentDate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and take care that your variables expand to a numeric representation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 15:44:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107607#M637050</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-19T15:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107608#M637051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a good thing to get the same chance for extremity date (&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vStartDate, &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vEndDate&lt;/STRONG&gt;&lt;/STRONG&gt;) than for others dates to be selected. But you will have a problem if Rand() return 1, you will have &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vEndDate&lt;/STRONG&gt;+1 returned...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to modify the expression like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date($(vStartDate)+ Round(Rand() * ($(vEndDate) - $(vStartDate)+&lt;SPAN style="color: #0000ff;"&gt;0.999&lt;/SPAN&gt;)-0.5)) as PaymentDate&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 19:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107608#M637051</guid>
      <dc:creator>sfatoux72</dc:creator>
      <dc:date>2016-05-19T19:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107609#M637052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I don't really know if the RAND() function returns values in the range [0,1] or ]0,1[ or a half - open variant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC once mentioned [0,1] in one of his blog post but the HELP just states&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px;"&gt;The function returns a random number between 0 and 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone ever seen an integer 1 returned &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107609#M637052</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-19T20:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107610#M637053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On a AutoGenerate of &lt;STRONG&gt;100M&lt;/STRONG&gt;, the max &lt;STRONG&gt;Rand() * 10000000000 &lt;/STRONG&gt; I got was &lt;STRONG&gt;9999999986.0302&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Rand() * 10000000000 as Num&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 100000000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess Stefan might be right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:17:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107610#M637053</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T20:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107611#M637054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tend to trust HIC, but [0,1] strikes me as very strange. I would expect [0,1) as we get with Excel and Java.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107611#M637054</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T20:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107612#M637055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a possible argument that it's likely [0,1). We have 52 bits to play with in IEEE 754 double-precision binary floating point, and it would be very rational to interpret that as a number between 0.00000... and 0.11111... binary, which would be [0,1). You could go [0,1], but you'd have to lose one of those random bits to do so, so you'd have only half as many random numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107612#M637055</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T20:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107613#M637056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'd have to run FAR more than 100M to have any sort of statistical certainty that 1 is being excluded, and are likely to have to run FAR more than 100M to see if 0 is included. I suppose that's an argument for "it doesn't matter". Your chance of ever seeing exactly 0 or 1, even if they're included, is extremely remote. Well, assuming actual randomness, which isn't the case. Hard to know with pseudo-random numbers. But I hate "this is statistically unlikely to cause you a problem" as an answer. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107613#M637056</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T20:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107614#M637057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish had the computing power to go to a level where the test might give more conclusive results. But just based on a 'SINGLE SMALL' sample test &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I deduced that Stefan is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I being a good statistician? No.&lt;/P&gt;&lt;P&gt;Am I being a good friend? Hell Ya!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107614#M637057</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T20:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107615#M637058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was somehow hoping that John would jump in &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe we should subtract a small number like Sebastien suggested to be on the safe side, or maybe we could use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMin(&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeMax(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vStartDate)+ Round(Rand() * ($(vEndDate) - $(vStartDate)+1)-0.5)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,$(vStartDate) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,$(vEndDate)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) as PaymentDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This should be super-safe, shouldn't it?&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107615#M637058</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-19T20:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107616#M637059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd personally let the possible 1 slide. I suspect the function returns [0,1). And if I'm wrong, I believe there's a 1/(2^52) chance of getting 1. I can live with that. I like to floor() my rand() since I believe in [0,1), so my variation on the theme would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;date($(vStartDate)+floor(rand()*($(vEndDate)-$(vStartDate)+1))) as PaymentDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say we're May 1 to May 10 of 2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;0.0 - &amp;lt;0.1 : May 1 &lt;BR /&gt;0.1 - &amp;lt;0.2 : May 2&lt;BR /&gt;...&lt;BR /&gt;0.9 - &amp;lt;1.0 : May 10&lt;BR /&gt;1 exactly&amp;nbsp; : May 11 (may not be possible, is at least highly improbable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like an equal chance of each date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: 1/(2^51+1) chance based on a guess of how they'd tackle including 1 by eliminating one of the random bits&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107616#M637059</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107617#M637060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would using a Ceil without adding the one a not so good option here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Date($(vStartDate) + Ceil(Rand() * ($(vEndDate) - &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;$(&lt;/SPAN&gt;vStartDate)))) as PaymentDate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: Or I should say equal to Floor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107617#M637060</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T21:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107618#M637061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that makes it virtually impossible to get vStartDate. You're randomly distributed between the other dates, so that much is good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE: Using floor() isn't why I add 1. I add 1 because I need to randomly distribute between the right number of dates. May 10 - May 1 = 9 days, but I need 10 days.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107618#M637061</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T21:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107619#M637062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, I need to go back and test what you just mentioned. To me both looked the same &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, but I might be mistaken and won't realize the difference until I run both the options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107619#M637062</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T21:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107620#M637063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let us know. I HATE it when people tell me "that won't work because" without testing it, and I totally just did that to you. Even if I turn out to be right, sorry!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107620#M637063</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T21:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107621#M637064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't HATE it John, gives me an option to try, test and learn a new thing. If would have told me that, Yes its the same, I would have trusted you and would have never went back and tested it at my end. But this give me an opportunity to go back and test and learn it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107621#M637064</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T21:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Generate random dates between a Start Date and End Date variables?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107622#M637065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I almost did it to someone else a few weeks back. It might have been Stephan. Someone wrote an expression that I "knew" was wrong, and I almost said so without testing it, but then I got smart and tested it first. It worked, and once I saw it work, I understood &lt;EM&gt;why&lt;/EM&gt; it worked. Almost put my foot in my mouth. Learned something instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moral of the story: Testing good! Jumping to conclusions bad!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:45:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Generate-random-dates-between-a-Start-Date-and-End-Date/m-p/1107622#M637065</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-05-19T21:45:34Z</dc:date>
    </item>
  </channel>
</rss>

