Here's an excerpt direct from ColdFusion Studio's help pages ;)
Thanks. Well, that's what I get for relying on the popup help and the O'Reilly
function reference...
When datepart is Weekday (w), DateDiff returns the number
of weeks between
the two dates. If date1 falls on a Monday,
Datediff
Usage
To find the number of days between date1 and date2, use Day of Year or Day.
When datepart is Weekday, DateDiff returns the number of weeks between the two dates.
If date1 falls on a Monday, DateDiff counts the number of Mondays to date2. It counts
date2 but not date1.
I just ran your example code on my CFMX 6.0 and got four 1's. Looks like
you might have a bug that is since been corrected there. Don't know what
that means to you
--
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-Original Message-
From: Lofback, Chris
Here's an excerpt direct from ColdFusion Studio's help pages ;)
When datepart is Weekday (w), DateDiff returns the number of weeks between
the two dates. If date1 falls on a Monday, DateDiff counts the number of
Mondays until date2. It counts date2 but not date1. If interval is Week
(ww),
James Blaha wrote:
Is below the best and only way to easily find out how many days are
between 2 dates? Im writing a template for a file backup where files
that are older then 5 day will be deleted and Im not sure what the
easiest best practice approach would be for the days check.
Jochem,
Thanks a million! Does the date format have to be in the -mm-dd format?
Regards,
James Blaha
Jochem van Dieten wrote:
James Blaha wrote:
Is below the best and only way to easily find out how many days are
between 2 dates? Im writing a template for a file backup where files
James Blaha wrote:
Thanks a million! Does the date format have to be in the -mm-dd format?
It doesn't have to be. But you wrote 6/3/03, and I wouldn't know what
date that is. I presume the 03 means 2003, but how about the rest? Is
that March 6 or June 3? Do you know? Does the next
Jochem,
Thanks again! All your points were well made.
Regards,
JB
Jochem van Dieten wrote:
James Blaha wrote:
Thanks a million! Does the date format have to be in the -mm-dd format?
It doesn't have to be. But you wrote 6/3/03, and I wouldn't know what
date that is. I presume
Too fast, Zachary. Try:
cfset Seconds = DateDiff("s", Date1, Date2)
cfset Minutes = Seconds \ 60
cfset Seconds = Seconds MOD 60
-David
On Wed, 30 Aug 2000 11:04:55 -0400 Zachary Bedell [EMAIL PROTECTED]
writes:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Try this:
cfset Seconds =
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Try this:
cfset Seconds = DateDiff("s", Date1, Date2)
cfset Minutes = Seconds MOD 60
cfset Seconds = Seconds - (Minutes * 60)
-Original Message-
From: Double Down [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 30, 2000 10:55 AM
To:
You can get the diff in minutes, and do the math to get the number of
days, hours, and minutes.
-David
On Sat, 29 Apr 2000 19:02:01 -0400 "Jeff Fongemie" [EMAIL PROTECTED]
writes:
I use the following to display how many days until an event date. It
only
shows how many days. Is there a way
11 matches
Mail list logo