On Thu, Apr 14, 2005 at 09:19:00AM +1000, Daniel Kasak wrote: > Robb wrote: > > > Hi, > > > > Does anyone have any idea what is up with Microsoft Access and its > > ridiculous Date/Time formatting options? > > :) > > In VB, I use the format: > > #dd-mmm-yyyy HH:mm:ss# > > Your example: > $dt = "#4/5/2004 5:3:45 PM#"; > > I would write as: > $dt = "#04-MAY-2004 17:03:34#";
Wouldn't single quotes also work?: $dt = "'04-MAY-2004 17:03:34'"; > Converting the month to a 3-character string version forces Access to > recognise the 1st part as the day and the last part as the year. If you > don't do this, it's selection of day/month/year positions appears to be > random. Doesn't putting the year first force YYYY-MM-DD interpretation? Tim [who doesn't know Access (and doesn't want to) but is curious]
