>- see footer for list info -<
You could break your StartDate and EndDate up into it's individual parts day, 
month and year.
Then use createdate() to create a system date to work with.

This avoids confusion over 7/9/05 meaning 7th Sept 2005 in UK and 9th July in 
US.

Another possible solution is to present your dates in dd-mmm-yyyy format. (e.g. 
7-Sep-2005).

Finally you could try looking as LSDateFormat and locale functions?

Mike

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Swingewood
Sent: 29 September 2005 14:56
To: [email protected]
Subject: [CF-Dev] Aggghhh! - Its driving me mad!


>- see footer for list info -<
Back to my calendar application again ....

I have a variable StartDate which I know holds 29/9/05 for example .....

If I run the code below all is well and {ts '2005-09-29 00:00:00'} gets 
written to the database.
All is working fine .... UNTIL

StartDate = 7/9/05

Then the code decides its going to insert {ts '2005-07-09 00:00:00'}

This is driving me nuts .... can anyone help me please. If I use dateformat 
will I loose the time element? - Aghhhh!


The code (its in a <cfscript> block)

// Add times to the dates and parse.
      StartDateTime = ParseDateTime(StartDate & " " & StartTime & ":00");
      EndDateTime = ParseDateTime(EndDate & " " & EndTime & ":00");


Regards - Paul

You can see this at www.bgfl.org/cfpages/calendar


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________________________________
Confidentiality:  This e-mail and its attachments are intended for the above 
named only and may be confidential.  If they have come to you in error you must 
take no action based on them, nor must you copy or show them to anyone; please 
reply to this e-mail and highlight the error.

Security Warning:  Please note that this e-mail has been created in the 
knowledge that Internet e-mail is not a 100% secure communications medium.  We 
advise that you understand and observe this lack of security when e-mailing us.

Viruses:  Although we have taken steps to ensure that this e-mail and 
attachments are free from any virus, we advise that in keeping with good 
computing practice the recipient should ensure they are actually virus free.
_______________________________________________________________________
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to