>> oohh, hang on....... this method does not work for dates? 

we've had no problems doing this...

        , update_on      =      <cfqueryparam cfsqltype="CF_SQL_DATE" 
                                        null="#YesNoFormat(not 
len(arguments.data.update_on))#"
                                        value="#arguments.data.update_on#" 
                                        />

still a bit long winded, sure but it works


"IIF" is evil if not carefully used... 

my 2c
barry.b




> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Scott
> Thornton
> Sent: Thursday, 7 July 2005 10:51 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: cfparam for date
> 
> 
> Hi,
> 
> In the past, I have used the following (or something close to 
> it)  to pass a NULL value via cfqueryparam
> 
> <cfqueryparam cfsqltype="cf_sql_numeric" 
> value="#session.myevent.rsvpby#" 
> null="#IIF(session.myevent.rsvpby eq "", yes, no)#">
> 
> oohh, hang on....... this method does not work for dates? 
> 
> >>> [EMAIL PROTECTED] 07/07/05 10:36 am >>>
> Thank you all for your responses. I used an if statement in my sql and
> everything now works beautifully.
> 
> No one answered my original question. Am I to conclude that 
> there is no
> way to use cfparam to set a date to null?
> 
> Tom
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED] 
> Sent: Wednesday, 6 July 2005 4:03 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: cfparam for date
> 
> On Wed, Jul 06, 2005 at 03:36:54PM +1000, Tom MacKean wrote:
> 
> > If users don't enter a date in a field, I want it to go into the
> > database as null.
> > 
> > However, 
> > 
> > <cfparam name="session.myevent.rsvpby" default="" type="date">
> > 
> > and
> > 
> > <cfparam name="session.myevent.rsvpby" default="null" type="date">
> > 
> > don't work.
> > 
> > What do I use for a default value of nothing when it's a date?
> 
> <cfqueryparam value="#DateFieldVar#" CFSqlType="CF_SQL_TimeStamp"
>   null="Yes">
> 
> You can go to the added step of making the null="Yes|No" into
> a function such as  null="#isNullDate(DateFieldVar)#" 
> which returns Yes or No dyamically. It's also a good place to
> trap user errors that the interface might have missed, such 
> as entering "Tuesday" in a DD/MM/YYYY field.
> 
> Cheers
> 
> Paul Haddon
> Technical Services Manager
> Formstar Print Technologies
> 
> 
> ---
> You are currently subscribed to cfaussie as: 
> [EMAIL PROTECTED] 
> To unsubscribe send a blank email to
> [EMAIL PROTECTED] 
> Aussie Macromedia Developers: http://lists.daemon.com.au/ 
> 
> NOTICE: Medical and scientific information provided in print 
> and electronically by Sydney IVF might not be relevant to 
> your own circumstances and should always be discussed with 
> your own doctor before you act on it. This communication is 
> confidential and may contain copyright or otherwise protected 
> information of Sydney IVF Limited or a third party. If you 
> are not the intended recipient of this communication please 
> immediately let us know by reply email or telephone us on +61 
> 2 9221 5964, delete the communication and destroy all copies.
> 
> 
> ---
> You are currently subscribed to cfaussie as: 
> [EMAIL PROTECTED] 
> To unsubscribe send a blank email to 
> [EMAIL PROTECTED] 
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to