DateFormat(datevar, 'yyyy-mm-dd') would output 2001-01-01 just as in the
mysql database. I think date in mysql is date/time. Instead of
'yyyy-mm-dd' there are names like 'short', 'medium', 'long' and 'full'
but I don't remember off the top of my head what they output. I think
you would want 'short' so DateFormat(datevar, 'short')
Richard White wrote:
> hi, i have a field saved in mysql database as a Date type
> oddly when i run a cfquery to get it out of the database it comes back with
> the following:
>
> {ts '2001-01-01 00:00:00'}
>
> i am assuming ts means timestamp but this seems odd as it is saved as a date
> type and if i run the query in the mysql database it just returns 2001-01-01.
> Am i doing something wrong, or is there a function in cf to convert the above
> into just the date value that mysql outputs
>
> thanks for any help
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:258024
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4