Format- problems

U

Ulf Malmros

I have a query with the following :
Format(tblAvvikelser.regDate,"yyyy/mm"). If I put in 2010-05-27 (swedish
date format), it should return 2010-05.
On some clients it works fine but in others I receive an error, telling me
that the format can not be solved.
Why???
 
R

ryguy7272

Copied form a post I saw about 1 month ago:
Access will struggle to interpret a date. The text string "3/10/2010" will
be interpreted as March 10 (even if the user intended it to be 3 October),
but it will give a JDate value. "4/30/2010" will similarly be April 30 (and
it won't try it the other way since there's no 30th month). "30/4/2010" will
be intepreted as April 30, even though it's d/m/y, since the alternative
isn't a valid date.

So it will read the date as mm/dd/yyyy if it makes sense that way; only if
the day number is greater than 12 will it try to turn it around.

The Format() function recognizes date/time values according to the Microsoft
conventions:
http://www.techonthenet.com/access/functions/date/format.php
http://www.webcheatsheet.com/sql/access_functions/format.php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top