Thank you Steve
as you point out it was just the "" causing the problem
regards greg
----- Original Message -----
Sent: Tuesday, March 18, 2003 1:36 PM
Subject: [cfaussie] RE: Date difference and create date and date format AGE today

<cfset DOB = "31/12/2003">
<cfoutput>#DateDiff("yyyy",CreateODBCDateTime(DOB),NOW())#</cfoutput>
 
 
you cant do #DateDiff("yyyy",CreateODBCDateTime("DOB"),NOW())#, because it will look at "DOB" as a string, not a variable
 
Regards

Steve Onnis
Domain Concept Designs
+61 422 337 685
+61 3 9431 4249

http://www.domainconceptdesigns.com
[EMAIL PROTECTED]
http://www.cfcentral.com.au
[EMAIL PROTECTED]

("If you think it can't be done, you haven't asked me!") - Steve Onnis

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 1:26 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Date difference and create date and date format AGE today

Thank you Steve
 
the problem i have is my format is 31/12/2003 and is called from the database as #DOB#
 
can you point me in the right direction so the date diff works with format 31/12/2003 = DOB
 
#DateDiff("yyyy",CreateODBCDateTime("DOB"),NOW())#
 
regards and thank you
greg stone
----- Original Message -----
Sent: Tuesday, March 18, 2003 1:01 PM
Subject: [cfaussie] RE: Date difference and create date and date format AGE today

#DateDiff("yyyy",CreateODBCDateTime("1975-12-22"),NOW())#
 

Regards

Steve Onnis
Domain Concept Designs
+61 422 337 685
+61 3 9431 4249

http://www.domainconceptdesigns.com
[EMAIL PROTECTED]
http://www.cfcentral.com.au
[EMAIL PROTECTED]

("If you think it can't be done, you haven't asked me!") - Steve Onnis

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 12:53 PM
To: CFAussie Mailing List
Subject: [cfaussie] Date difference and create date and date format AGE today

Hi
 
i have a DOB date format 31/12/2003 and want to calculate the age today.
 
my current attemp to get this  working is below  but i can't switch the date format to match my stored info (DOB)
 
I cant work out how to combine the date format and the date create
#DateFormat(1960,06,10, "dd/mm/yyyy")#
 
here is my current attempt
<cfscript>
yearssgone = DateDiff("yyyy",CreateDate(1960,06,10),NOW());
</cfscript>
<strong>age today :<cfoutput>#yearssgone#</cfoutput></strong>
 
Can any one help with this one.
maybe a simpler snippet
 
thanks inadvance
greg stone
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/ ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/ ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to