|simc||-- 04-27-2009 @ 2:59 PM|
Hello all, I'm moved some code and a DB from one server to another, and the database now seems to be messing up some date formats.
The code snippet is:
Select distinct ("committee" & "ctcc_meeting_date_format") as new_num,
Basically two feilds are being combined to form a new one.
On the production system the value of ctcc_meeting_date_format is “2009-06-04 00:00:00” and it creats this new variable: FAS04/06/2009
On the new server, the value of ctcc_meeting_date_format is also “2009-06-04 00:00:00” but it creates this new variable: FAS6/4/2009
The month and day are beign flipped, and the leading zero's are being dropped....
|weathermanfsu||-- 06-09-2009 @ 12:11 PM|
You are doing things the hard way. Why not spit it out and format the output rather than try and create a new column in the database call and format it in the database call?
Inside your <cfoutput> tags just place a <cfset myvariable = #committee# & #dateformat(ctcc_meeting_date_format, 'm/d/yyyy'#>
And really you do not even need the cfset, you can just spit it out to the screen....
<cfoutput query = "myquery">
#committee# & #dateformat(ctcc_meeting_date_format, 'm/d/yyyy'#></cfoutput>
|EasyCFM.COM ColdFusion Forums :||http://archive.easycfm.com/forums|