DatePart() expects a CF datetime object, so I'm surprised it works at
all with a text date. Parse the date with LSParseDateTime() (assuming
you have used setLocale() and then datePart() will work properly:
DatePart(LSParseDateTime("12/02/2005"))
-----Original Message-----
From: Mark Henderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 31 May 2005 6:07
To: CF-Talk
Subject: DatePart problem
I want to extract the month from a date that is in the format dd/m/yyyy,
so I've tried using DatePart (access is the database format). The
problem I have is that, by default, DatePart always seems to presume the
entry is in the m/dd/yyyy format and thus, it's setting the month from
the day (where possible).
An example: from 12/02/2005 (12th February 2005) DatePart will select
the 12 as the month. From 25/02/2005, it obviously works correctly, due
to a lack of alternatives.
[snip]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208013
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54