Doesn't datediff return a number not a date ?

ie, number if seconds or number if months dependiing on what u specifiy, you
can use dateadd to add the datediff calculated figure back on though I think

-----Original Message-----
From: Amanda Stern [mailto:[EMAIL PROTECTED]]
Sent: 09 August 2001 22:26
To: CF-Talk
Subject: Time Difference Function - newbie!!!!!



Hello again!

I am having some trouble calculating the time
difference for two datetime field2 which I then try
and add together....here is what I have done:

My SQL Stmt:
    Select DateDiff("mi", dApptEndTime, 
                   dApptBeginTime) as Diff1,
    DateDiff("mi", dApptEndTime2, dApptBeginTime2) as
Diff2,   
    cas.icasacapptID,
        cas.dApptBeginTime as BeginTime, 
        cas.dApptEndTime as EndTime,
        cas.dApptBeginTime2 as BeginTime2, 
        cas.dApptEndTime2 as EndTime2,
        'None' as TimeCode,
        cli.iclientID,........etc

then later in the code I do a cfset:  

<cfset variables.TimeDifference = CasacActivity.Diff1 
    + QRYCasacActivity.Diff2>


I get an error stating that it cannot convert to
number......

How can I get around this?

Thanks a million!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to