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

Date creation problem

Hi,

I have 3 variables like: year=2011, month=02, day=01.

I want to create date using these variables in the "YYYY-MM-DD" format.

I went through the date help page and found

Default setting 1

Default setting 2

Date format

YY-MM-DD

M/D/YY

date( A ) where A=35648 returns:

Setting 1

Setting 2

String

97-08-06

8/6/97

Number

35648

35648

Can you please guide me which formula has been applied here to convert the "97-08-06" into "35648"?

I want to use same formula in my case.

Thanks

2 Replies
Not applicable
Author

with num( makedate(year,month,day)) if you want the date use makedate(year,month,day) in this way you force qv to make a date with that numbers

prieper
Master II
Master II

First you have to use the MAKEDATE-function:

MAKEDATE(year, month, day)

This should transform your variables into a date, which will be displayed as in your settings for dates.
If used in scripts, you may need to embed it into $(...), like other variables.

If another display is required you may further embed with DATE-function.

See the attached

HTH
Peter