DateFormat misery

2004-02-27 Thread cf coder
Hello everybody,
I can't understand what's happenning here. I have form
with a text field and a date selector that pops up
when a user clicks on a img next to the text field.
If I select a date from the calendar, say for example
I selected this: 5/1/2004 11:04 (05 Jan. 2004), the
text field is set to 5/1/2004 11:04. I'm passing this
value in a url variable. 

On the action page when I output this url variable the
value displayed is the same (5/1/2004 11:04), however
if I do this:
cfoutput#dateFormat(url.timestamp,'/mm/dd')#/cfoutput,
the output value is 2004/05/01 when I expect it to be
2004/01/05. Can anybody tell me what's happenning here
because I can't figure it out why this is happenning.
I am using CFMX

Best Regards,
CFCODER

__
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateFormat misery

2004-02-27 Thread Pascal Peters
Probably, your locale is US, so it formats a US date (mm/dd/). I
always use ISO-format and if I have a text field with a date, I write a
function to transform it to ISO (-mm-dd).

 -Original Message-
 From: cf coder [mailto:[EMAIL PROTECTED] 
 Sent: vrijdag 27 februari 2004 12:11
 To: CF-Talk
 Subject: DateFormat misery
 
 Hello everybody,
 I can't understand what's happenning here. I have form with a 
 text field and a date selector that pops up when a user 
 clicks on a img next to the text field.
 If I select a date from the calendar, say for example I 
 selected this: 5/1/2004 11:04 (05 Jan. 2004), the text field 
 is set to 5/1/2004 11:04. I'm passing this value in a url variable. 
 
 On the action page when I output this url variable the value 
 displayed is the same (5/1/2004 11:04), however if I do this:
 cfoutput#dateFormat(url.timestamp,'/mm/dd')#/cfoutput,
 the output value is 2004/05/01 when I expect it to be 
 2004/01/05. Can anybody tell me what's happenning here 
 because I can't figure it out why this is happenning.
 I am using CFMX
 
 Best Regards,
 CFCODER
 
 __
 Do you Yahoo!?
 Get better spam protection with Yahoo! Mail.
 http://antispam.yahoo.com/tools
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateFormat misery

2004-02-27 Thread Thomas Chiverton
On Friday 27 Feb 2004 11:11 am, cf coder wrote:
 if I do this:
 cfoutput#dateFormat(url.timestamp,'/mm/dd')#/cfoutput,

What about lsDateFormat ?

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateFormat misery

2004-02-27 Thread cf coder
I've just noticed that if the date selected is 20/2/2004 11:35, dateformat
correctly outputs it - 2004/02/20 (/mm/dd), but if the date selected is
5/2/2004 11:35, the output is - 2004/05/02. I have the meta tag on top of my page
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

Any thoughts?

Probably, your locale is US, so it formats a US date (mm/dd/). I
always use ISO-format and if I have a text field with a date, I write a
function to transform it to ISO (-mm-dd).


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateFormat misery

2004-02-27 Thread cf coder
LSDateFormat does the trick. Thank you all for your help

I've just noticed that if the date selected is 20/2/2004 11:35, dateformat
correctly outputs it - 2004/02/20 (/mm/dd), but if the date selected is
5/2/2004 11:35, the output is - 2004/05/02. I have the meta tag on top of my page
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

Any thoughts?

Probably, your locale is US, so it formats a US date (mm/dd/). I
always use ISO-format and if I have a text field with a date, I write a
function to transform it to ISO (-mm-dd).


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateFormat misery

2004-02-27 Thread Pascal Peters
That's becausethe 20th month doesn't exist. It is a CF feature that
it will switch day and month in a date if the month is higher than 12
(and the switched date exists) 

 -Original Message-
 From: cf coder [mailto:[EMAIL PROTECTED] 
 Sent: vrijdag 27 februari 2004 11:48
 To: CF-Talk
 Subject: Re: DateFormat misery
 
 I've just noticed that if the date selected is 20/2/2004 
 11:35, dateformat correctly outputs it - 2004/02/20 
 (/mm/dd), but if the date selected is
 5/2/2004 11:35, the output is - 2004/05/02. I have the meta 
 tag on top of my page meta http-equiv=Content-Type 
 content=text/html; charset=iso-8859-1
 
 Any thoughts?
 
 Probably, your locale is US, so it formats a US date (mm/dd/). I 
 always use ISO-format and if I have a text field with a 
 date, I write a 
 function to transform it to ISO (-mm-dd).
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]