I've been thinking about that too.  I think i'll just wrap the
createdate in a try/catch and forget IsValid.  I'm not sure what the
point is of creating such a function if it's never going to be able to
be given an invalid date.

Anyway thanks for your help everyone.  I'll go the try/catch route.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month


On Fri, Feb 20, 2009 at 3:26 PM, Adam Chapman <a...@portplus.com> wrote:
>
> I second Brett's method.. I do the same thang myself.
>
> Regards,
> Adam
>
>
> -----Original Message-----
> From: Brett Payne-Rhodes [mailto:bret...@gmail.com]
> Sent: Friday, February 20, 2009 3:17 PM
> To: cfaussie@googlegroups.com
> Subject: [cfaussie] Re: Validating dates ... what's the trick?
>
>
> I could never get a reliable result from the various 'parsedate'
> functions...
>
> In the end I wrote my own function to create dates from strings. It
> looks for a variety of delimiters then extracts day, month, year; or
> month, year, day; or even year, month, day; depending on how it was set
> up.
>
> The trick at the end is to use createDate(year, month, day) wrapped up
> in a try/catch. If it throws an error then you have a problem.
>
> hth
>
> Brett
> B)
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to