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/

Reply via email to