Saving a non en_US locale date to MSAccess
Sorry to bump this, but I could really use some input and advice on the post below from the gurus on the list. An european locale (it_IT) shows the date as d/m/yyy in a form field. At the moment of retrieving from the MSAccess db it will not be recognized. So, before saving, I parse the date with DatePart(...), recompose it with CreateDateTime(...) and finally create the dateobject with CreateODBCDateTime(...) This way the date is saved correctly. Couldn't find any LS function to restore it to local date format. Am I wrong? Is there a less cumbersome way to do it? Thank you very much. ContiW ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259179 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Saving a non en_US locale date to MSAccess
Couldn't find any LS function to restore it to local date format. Am I wrong? LSDateFormat? Is there a less cumbersome way to do it? LSParseDateTime? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259185 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Saving a non en_US locale date to MSAccess
And do not forget to set locale into your locale before using LS* functions. CFMX 7 cfset temp = SetLocale(it_IT) For old CFs cfset temp = SetLocale(Italian (Standard)) Dave Watts wrote: Couldn't find any LS function to restore it to local date format. Am I wrong? LSDateFormat? Is there a less cumbersome way to do it? LSParseDateTime? OÄuz Demirkapı TeraTech Inc. | Senior Developer 405 East Gude Dr Suite 207, Rockville, MD 20850, USA Voice: +1 (301) 424-3903 ext 111 | Fax: +1 (301) 762-8185 Web: http://www.teratech.com | E-mail: oguz.demirkapi AT teratech.com Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~~~ ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259190 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Saving a non en_US locale date to MSAccess
Thank you Dave. How embarassing. I thought I have tried LSParseDateTime and didn't works. It works perfectly. RTFM to me. Thanks again. ContiW Couldn't find any LS function to restore it to local date format. Am I wrong? LSDateFormat? LSParseDateTime? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259195 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4