Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date# resturn small decimal

Hi All,

I am working on the for next loop on the date. And want to convert the date to number.

Let vYesterday = Num(Today(1)-1);

Let vMaxDateInQVD = Date($(vYesterday)-10);

Let vTest = Date#($(vMaxDateInQVD));

but the returns are:

vTest     "0.00013799194127063"

vMaxDateInQVD     5/18/2013

vYesterday     41422

Why the vTest is a small decimal? I suppose it should be an integer likes vYesterday - 10

Is there anyone help?

2 Replies
Not applicable
Author

I change it to:

Let vYesterday = Num(Today(1)-1);

Let vMaxDateInQVD = Date($(vYesterday)-10);

Let vTest = Date#('$(vMaxDateInQVD)');

Added two single quot, it seems work now if I use Num function.

jvitantonio
Luminary Alumni
Luminary Alumni

Hi, you should you this:

Let vTest = Date#(vMaxDateInQVD);

Don't use $ ( )