Ellwood wrote:
Back to basics lads.
The datatime needs to be in single quotes for a start. Secondly, is it an access db because if so dates need to be in #'s so you will need to triple escape them i.e. ###data### and thirdly, the only guaranteed way to pass dates and not confuse the locale settings of the db is to use dateformat(yourdate, 'dd-mmm-yyyy')
Damn it! PC just crashed and took the email response I'd written with it!
It went somewhere along the lines of :
"Eeek! I've not had to do that since CF3.0!!!!"
And then went on to talk about the ls functions and get and set Locale to make sure that your dates are handled correctly, but if the users are allowed to enter dates into a free text field then you could end up with the dates in any format, if not just complete rubbish, and the locale functions being of no use to you what so ever.
There was also reference to the fact that dates returned by database should be in ISO 8601/UTC format, so CF should handle them correctly.
I think I also said something about making sure that your server, OS and database are installed/set up with consistent date settings, but once you know that there is inconsistency in the date settings, then the locale/international functions can help keep you straight.
I also mentioned about dates having a midnight time on them if you have a date/time data type field in a DB and don't insert a time with a date and that you need to take that into account when doing BETWEEN/<= => type queries.
Well that should give you plenty of reading to do..... ;o)
Regards
Stephen
-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by
activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*To unsubscribe, e-mail: [EMAIL PROTECTED]
