Setting a date despite international setting

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

How can one do a date conversion independently of the
Country setting of the Windows system. If I as an example
use Cdate("01-05-03") I will get a different date
depending on what the country has been set to in Windows
international settings.
But in my database I have separate values for year and
month (for an event), and now I need a date value for the
first day of that month for some calculations. Which
function or expression can I use that I will get me
that, regardless of the Country setting.

Any help much appreciated.


Regards,

Frank
 
You might try the DateSerial() function.

The syntax is:

DateSerial(year,month,day)

regardless of regional settings.

For example:

DateSerial(2001,5,3)

will return the date May 3, 2001.

Check the help for details. In particular, be aware of how it handles
two-digit years.
 
Thanks, this works fine.

Regards,

Frank

-----Original Message-----
You might try the DateSerial() function.

The syntax is:

DateSerial(year,month,day)

regardless of regional settings.

For example:

DateSerial(2001,5,3)

will return the date May 3, 2001.

Check the help for details. In particular, be aware of how it handles
two-digit years.





.
 
Back
Top