>- see footer for list info -<
Are you using ODBC to connect to your MS SQL database?

If so, you could try using createODBCdate() function for writing to the 
database.

So take your euro-dates and break them up first.

Something like this...

If request.StartDate and request.EndDate is "09/05/2005"

<cfscript>
DayPt = ListFirst(request.StartDate,"/");
MthPt = ListGetAt(request.StartDate,2,"/");
YrPt = ListLast (request.StartDate,"/");
ODBCStartDate = createODBCDate(CreateDate(YrPt, MthPt, DayPt));

DayPt = ListFirst(request.EndDate,"/");
MthPt = ListGetAt(request.EndDate,2,"/");
YrPt = ListLast (request.EndDate,"/");
ODBCEndDate = createODBCDate(CreateDate(YrPt, MthPt, DayPt));
</cfscript>

<cfquery name="insertRec" datasource="whatever">
INSERT INTO table
(EventTypeID,StartDate,EndDate)
VALUES (#request.EventTypeID#,#ODBCStartDate#,#ODBCEndDate#)
</cfquery>

Regards

Mike

-----Original Message-----
From: Paul Swingewood [mailto:[EMAIL PROTECTED]
Sent: 22 July 2005 14:20
To: [email protected]
Subject: RE: [CF-Dev] Help - PLEASE..!!


>- see footer for list info -<

Sorry all. I should have said this is a MS SQL database.

Regards - Paul (Still pulling my hair out)


>From: "Paul Swingewood" <[EMAIL PROTECTED]>
>Reply-To: Coldfusion Development <[email protected]>
>To: [email protected]
>Subject: [CF-Dev] Help - PLEASE..!!
>Date: Fri, 22 Jul 2005 12:14:38 +0100
>
>>- see footer for list info -<
>This is driving me nuts and I just can't figure out whats going on ....?
>
>I have two variables #request.startdate# #request.enddate#
>
>If I run this
>
><cfoutput>
>INC_EVENT_BEGIN_PROCESS
><p>
>START - #Request.StartDate#<br>
>END - #Request.EndDate#
></p>
></cfoutput>
><cfabort>
>
>I see that dates correctly as expected
>
>This part of a query inserts to an SQL table with the fields set as 
>datetime
>
>VALUES (
>             #Request.EventTypeID#,
>             '#Request.EventName#',
>             '#Request.EventShortDesc#',
>             NULLIF('#Request.EventDescription#',''),
>             '#Request.Location#',
>             NULLIF('#Request.EventURL#',''),
>             #lsdateformat(Request.StartDate, 'dd/mm/yyyy')#,
>             #lsdateformat(Request.EndDate, 'dd/mm/yyyy')#,
>             NULLIF('#Request.ContactName#',''),
>
>When I look in the table both dates are set to 01/01/1900
>
>AGhhhh! - Im tearing my hair out on this one. Can anyone help me please.
>(I've tried removing the lsdateformat but that didn't do anything :(
>
>Regards - Paul
>
>
>_______________________________________________
>
>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 -<


_______________________________________________

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

SHAPE THE NORTH EAST'S FUTURE

The revised Regional Economic Strategy (RES) is out for formal consultation 
from 6 June 
to 30 August 2005.  This is your chance to help shape the future of the North 
East and 
improve economic prosperity for all.  For further information about how you and 
your organisation 
can contribute, visit www.onenortheast.co.uk Alternatively, you can call the 
RES team on 
0191 229 6899 or e-mail [EMAIL PROTECTED]
_______________________________________________________________________
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