EasyCFM.COM ColdFusion Forums / MS Access Related Issues / Date issue on different servers

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Date issue on different servers

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

simc
04-27-2009 @ 2:59 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 1
Joined: Apr 2009

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....

Any Ideas?

Cahrles




weathermanfsu
06-09-2009 @ 12:11 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 183
Joined: Apr 2004

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>



Website Designed and Developed by Pablo Varando.