Hi Try this, create a new date using dateformat, based on your existing date. <cfset tmpdate = dayformat(varName, "dd/mm/yyyy")>
Then run datepart on tmpDate I haven't tested it, but it should provide a workaround -----Original Message----- From: Mark Henderson [mailto:[EMAIL PROTECTED] Sent: 31 May 2005 11: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. Actually, my situation is slightly more complicated in that this is actually used to submit events to a calendar table in the database. Start_date is currently in the above mentioned dd/m/yyyy format and that is the way I wish to keep things (to save confusion for those submitting). So my question - can this be achieved, and if so, how...any ideas? A worst case scenario means I will just have to alter the form thats entered, but this (DatePart) is something I might like to use in the future, so I figured I would ask. All help appreciated. TIA Mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208012 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

