Re: [cftalk] calculating the date and time.

2003-08-14 Thread Allan Cliff
CFIF LookingAt IS Week
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
/CFIF

I haven't tested this so there maybe small errors but something like this??
  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:24 PM
  Subject: [cftalk] calculating the date and time.


  How do I get the calculate the from time to start at 01:00 am and the to time to end 
at 00:59 am. Can you please show me how to get the date and time in the format 
mentioned below

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


   I was hoping somebody could help me. I'm trying to
   display the date and time. This is how I want to
   display it:
  
   If the current time is 10:05, I want to display the
   time in this format:
  
   In the last hour (09:05 - 10:04)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
   09:59)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
   00:59)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
   00:59)
  
  Look into DateAdd() - you can add any amount of time to a date, from
  seconds to years
  
  If you want to remove 7 days, you can just do DateAdd(d, -7, Now())
  
  Hope this helps
  
  
  
  

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-08-12 Thread Allan Cliff
CFIF LookingAt IS Day
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF

  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:48 PM
  Subject: [cftalk] calculating the date and time.


  Spot on Allan, this is what I was trying to do. Can you show me how to calclulate 
the from-to date time in the last 24 hours

  In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

  Many Thanks
  Allan

  CFIF LookingAt IS Week
  
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,
  0)
  
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
  /CFIF
  
  I haven't tested this so there maybe small errors but something like 
  this??

  - Original Message - 

  From: ColdFusion Programmer 

  To: CF-Talk 

  Sent: Wednesday, July 30, 2003 12:24 PM

  Subject: [cftalk] calculating the date and time.
  
  

  How do I get the calculate the from time to start at 01:00 am and the 
  to time to end at 00:59 am. Can you please show me how to get the date 
  and time in the format mentioned below
  

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)
  
  

   I was hoping somebody could help me. I'm trying to

   display the date and time. This is how I want to

   display it:

  

   If the current time is 10:05, I want to display the

   time in this format:

  

   In the last hour (09:05 - 10:04)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003

   09:59)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003

   00:59)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003

   00:59)

  

  Look into DateAdd() - you can add any amount of time to a date, from

  seconds to years

  

  If you want to remove 7 days, you can just do DateAdd(d, -7, 
  Now())

  

  Hope this helps

  

  

  

  

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-08-05 Thread Allan Cliff
That should have read Yesterday and not LastWeek but you know what i mean

CFIF LookingAt IS Day
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
CFSET Yesterday = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF

  - Original Message - 
  From: Allan Cliff 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:53 PM
  Subject: Re: [cftalk] calculating the date and time.


  CFIF LookingAt IS Day
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
  /CFIF

- Original Message - 
From: ColdFusion Programmer 
To: CF-Talk 
Sent: Wednesday, July 30, 2003 12:48 PM
Subject: [cftalk] calculating the date and time.


Spot on Allan, this is what I was trying to do. Can you show me how to calclulate 
the from-to date time in the last 24 hours

In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

Many Thanks
Allan

CFIF LookingAt IS Week

CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,
0)

CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
/CFIF

I haven't tested this so there maybe small errors but something like 
this??
  
- Original Message - 
  
From: ColdFusion Programmer 
  
To: CF-Talk 
  
Sent: Wednesday, July 30, 2003 12:24 PM
  
Subject: [cftalk] calculating the date and time.


  
How do I get the calculate the from time to start at 01:00 am and the 
to time to end at 00:59 am. Can you please show me how to get the date 
and time in the format mentioned below

  
In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


  
 I was hoping somebody could help me. I'm trying to
  
 display the date and time. This is how I want to
  
 display it:
  

  
 If the current time is 10:05, I want to display the
  
 time in this format:
  

  
 In the last hour (09:05 - 10:04)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  
 09:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
Look into DateAdd() - you can add any amount of time to a date, from
  
seconds to years
  

  
If you want to remove 7 days, you can just do DateAdd(d, -7, 
Now())
  

  
Hope this helps
  

  

  

  

  

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-08-05 Thread Allan Cliff
It is just a matter of paying with the individual time values to get what you need.
The hour is always 59 minutes past the current hour minus 1.

CFIF LookingAt IS Day
CFSET Today = 
CreateDateTime(Year(Now()),Month(Now()),Day(Now()),Hour(DateAdd(H,-1,Now(,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF


  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 1:00 PM
  Subject: [cftalk] calculating the date and time.


  not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the 
result to be 
  (29 Jul 2003 11:00 - 30 Jul 2003 10:59)


  CFIF LookingAt IS Day
  
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,
  0)
  
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
  /CFIF
  

  - Original Message - 

  From: ColdFusion Programmer 

  To: CF-Talk 

  Sent: Wednesday, July 30, 2003 12:48 PM

  Subject: [cftalk] calculating the date and time.
  
  

  Spot on Allan, this is what I was trying to do. Can you show me how to 
  calclulate the from-to date time in the last 24 hours
  

  In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)
  

  Many Thanks

  Allan
  

  CFIF LookingAt IS Week

  

  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,
  59,

  0)

  

  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))

  /CFIF

  

  I haven't tested this so there maybe small errors but something like 
  

  this??
  
  

  - Original Message - 
  
  

  From: ColdFusion Programmer 
  
  

  To: CF-Talk 
  
  

  Sent: Wednesday, July 30, 2003 12:24 PM
  
  

  Subject: [cftalk] calculating the date and time.

  

  
  
  

  How do I get the calculate the from time to start at 01:00 am and the 
  

  to time to end at 00:59 am. Can you please show me how to get the 
  date 

  and time in the format mentioned below

  
  
  

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)

  

  
  
  

   I was hoping somebody could help me. I'm trying to
  
  

   display the date and time. This is how I want to
  
  

   display it:
  
  

  
  
  

   If the current time is 10:05, I want to display the
  
  

   time in this format:
  
  

  
  
  

   In the last hour (09:05 - 10:04)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  
  

   09:59)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  
  

   00:59)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  
  

   00:59)
  
  

  
  
  

  Look into DateAdd() - you can add any amount of time to a date, 
  from
  
  

  seconds to years
  
  

  
  
  

  If you want to remove 7 days, you can just do DateAdd(d, -7, 

  Now())
  
  

  
  
  

  Hope this helps
  
  

  
  
  

  
  
  

  
  
  

  

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



calculating the date and time.

2003-07-30 Thread Allan Clarke
Hi All,

I was hoping somebody could help me. I'm trying to
display the date and time. This is how I want to
display it:

If the current time is 10:05, I want to display the
time in this format:

In the last hour (09:05 - 10:04)

If the current time is 10:05 and the date is 30.July,
I want to display the date time in this format:

In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
09:59)

If the current time is 10:05 and the date is 30.July,
I want to display the date time in this format:

In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
00:59)

If the current time is 10:05 and the date is 30.July,
I want to display the date time in this format:

In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
00:59)

Many thanks in advance.

Allan

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: calculating the date and time.

2003-07-30 Thread Philip Arnold
 I was hoping somebody could help me. I'm trying to
 display the date and time. This is how I want to
 display it:

 If the current time is 10:05, I want to display the
 time in this format:

 In the last hour (09:05 - 10:04)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
 09:59)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
 00:59)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
 00:59)

Look into DateAdd() - you can add any amount of time to a date, from
seconds to years

If you want to remove 7 days, you can just do DateAdd(d, -7, Now())

Hope this helps



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
How do I get the calculate the from time to start at 01:00 am and the to time to end 
at 00:59 am. Can you please show me how to get the date and time in the format 
mentioned below

In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


 I was hoping somebody could help me. I'm trying to
 display the date and time. This is how I want to
 display it:

 If the current time is 10:05, I want to display the
 time in this format:

 In the last hour (09:05 - 10:04)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
 09:59)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
 00:59)

 If the current time is 10:05 and the date is 30.July,
 I want to display the date time in this format:

 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
 00:59)

Look into DateAdd() - you can add any amount of time to a date, from
seconds to years

If you want to remove 7 days, you can just do DateAdd(d, -7, Now())

Hope this helps



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
CFIF LookingAt IS Week
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
/CFIF

I haven't tested this so there maybe small errors but something like this??
  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:24 PM
  Subject: [cftalk] calculating the date and time.


  How do I get the calculate the from time to start at 01:00 am and the to time to end 
at 00:59 am. Can you please show me how to get the date and time in the format 
mentioned below

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


   I was hoping somebody could help me. I'm trying to
   display the date and time. This is how I want to
   display it:
  
   If the current time is 10:05, I want to display the
   time in this format:
  
   In the last hour (09:05 - 10:04)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
   09:59)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
   00:59)
  
   If the current time is 10:05 and the date is 30.July,
   I want to display the date time in this format:
  
   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
   00:59)
  
  Look into DateAdd() - you can add any amount of time to a date, from
  seconds to years
  
  If you want to remove 7 days, you can just do DateAdd(d, -7, Now())
  
  Hope this helps
  
  
  
  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the 
from-to date time in the last 24 hours

In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

Many Thanks
Allan

CFIF LookingAt IS Week

CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,
0)

CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
/CFIF

I haven't tested this so there maybe small errors but something like 
this??
  
- Original Message - 
  
From: ColdFusion Programmer 
  
To: CF-Talk 
  
Sent: Wednesday, July 30, 2003 12:24 PM
  
Subject: [cftalk] calculating the date and time.


  
How do I get the calculate the from time to start at 01:00 am and the 
to time to end at 00:59 am. Can you please show me how to get the date 
and time in the format mentioned below

  
In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


  
 I was hoping somebody could help me. I'm trying to
  
 display the date and time. This is how I want to
  
 display it:
  

  
 If the current time is 10:05, I want to display the
  
 time in this format:
  

  
 In the last hour (09:05 - 10:04)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  
 09:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
Look into DateAdd() - you can add any amount of time to a date, from
  
seconds to years
  

  
If you want to remove 7 days, you can just do DateAdd(d, -7, 
Now())
  

  
Hope this helps
  

  

  

  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
CFIF LookingAt IS Day
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF

  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:48 PM
  Subject: [cftalk] calculating the date and time.


  Spot on Allan, this is what I was trying to do. Can you show me how to calclulate 
the from-to date time in the last 24 hours

  In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

  Many Thanks
  Allan

  CFIF LookingAt IS Week
  
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,
  0)
  
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
  /CFIF
  
  I haven't tested this so there maybe small errors but something like 
  this??

  - Original Message - 

  From: ColdFusion Programmer 

  To: CF-Talk 

  Sent: Wednesday, July 30, 2003 12:24 PM

  Subject: [cftalk] calculating the date and time.
  
  

  How do I get the calculate the from time to start at 01:00 am and the 
  to time to end at 00:59 am. Can you please show me how to get the date 
  and time in the format mentioned below
  

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)
  
  

   I was hoping somebody could help me. I'm trying to

   display the date and time. This is how I want to

   display it:

  

   If the current time is 10:05, I want to display the

   time in this format:

  

   In the last hour (09:05 - 10:04)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003

   09:59)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003

   00:59)

  

   If the current time is 10:05 and the date is 30.July,

   I want to display the date time in this format:

  

   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003

   00:59)

  

  Look into DateAdd() - you can add any amount of time to a date, from

  seconds to years

  

  If you want to remove 7 days, you can just do DateAdd(d, -7, 
  Now())

  

  Hope this helps

  

  

  

  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
That should have read Yesterday and not LastWeek but you know what i mean

CFIF LookingAt IS Day
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
CFSET Yesterday = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF

  - Original Message - 
  From: Allan Cliff 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 12:53 PM
  Subject: Re: [cftalk] calculating the date and time.


  CFIF LookingAt IS Day
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0)
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
  /CFIF

- Original Message - 
From: ColdFusion Programmer 
To: CF-Talk 
Sent: Wednesday, July 30, 2003 12:48 PM
Subject: [cftalk] calculating the date and time.


Spot on Allan, this is what I was trying to do. Can you show me how to calclulate 
the from-to date time in the last 24 hours

In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

Many Thanks
Allan

CFIF LookingAt IS Week

CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,59,
0)

CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
/CFIF

I haven't tested this so there maybe small errors but something like 
this??
  
- Original Message - 
  
From: ColdFusion Programmer 
  
To: CF-Talk 
  
Sent: Wednesday, July 30, 2003 12:24 PM
  
Subject: [cftalk] calculating the date and time.


  
How do I get the calculate the from time to start at 01:00 am and the 
to time to end at 00:59 am. Can you please show me how to get the date 
and time in the format mentioned below

  
In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


  
 I was hoping somebody could help me. I'm trying to
  
 display the date and time. This is how I want to
  
 display it:
  

  
 If the current time is 10:05, I want to display the
  
 time in this format:
  

  
 In the last hour (09:05 - 10:04)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  
 09:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
 If the current time is 10:05 and the date is 30.July,
  
 I want to display the date time in this format:
  

  
 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  
 00:59)
  

  
Look into DateAdd() - you can add any amount of time to a date, from
  
seconds to years
  

  
If you want to remove 7 days, you can just do DateAdd(d, -7, 
Now())
  

  
Hope this helps
  

  

  

  

  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the 
result to be 
(29 Jul 2003 11:00 - 30 Jul 2003 10:59)


CFIF LookingAt IS Day

CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,
0)

CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF

  
- Original Message - 
  
From: ColdFusion Programmer 
  
To: CF-Talk 
  
Sent: Wednesday, July 30, 2003 12:48 PM
  
Subject: [cftalk] calculating the date and time.


  
Spot on Allan, this is what I was trying to do. Can you show me how to 
calclulate the from-to date time in the last 24 hours

  
In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)

  
Many Thanks
  
Allan

  
CFIF LookingAt IS Week
  

  
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,
59,
  
0)
  

  
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))
  
/CFIF
  

  
I haven't tested this so there maybe small errors but something like 

  
this??


  
- Original Message - 


  
From: ColdFusion Programmer 


  
To: CF-Talk 


  
Sent: Wednesday, July 30, 2003 12:24 PM


  
Subject: [cftalk] calculating the date and time.
  

  



  
How do I get the calculate the from time to start at 01:00 am and the 

  
to time to end at 00:59 am. Can you please show me how to get the 
date 
  
and time in the format mentioned below
  



  
In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)
  

  



  
 I was hoping somebody could help me. I'm trying to


  
 display the date and time. This is how I want to


  
 display it:


  



  
 If the current time is 10:05, I want to display the


  
 time in this format:


  



  
 In the last hour (09:05 - 10:04)


  



  
 If the current time is 10:05 and the date is 30.July,


  
 I want to display the date time in this format:


  



  
 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003


  
 09:59)


  



  
 If the current time is 10:05 and the date is 30.July,


  
 I want to display the date time in this format:


  



  
 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003


  
 00:59)


  



  
 If the current time is 10:05 and the date is 30.July,


  
 I want to display the date time in this format:


  



  
 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003


  
 00:59)


  



  
Look into DateAdd() - you can add any amount of time to a date, 
from


  
seconds to years


  



  
If you want to remove 7 days, you can just do DateAdd(d, -7, 
  
Now())


  



  
Hope this helps


  



  



  



  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
It is just a matter of paying with the individual time values to get what you need.
The hour is always 59 minutes past the current hour minus 1.

CFIF LookingAt IS Day
CFSET Today = 
CreateDateTime(Year(Now()),Month(Now()),Day(Now()),Hour(DateAdd(H,-1,Now(,59,0)
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF


  - Original Message - 
  From: ColdFusion Programmer 
  To: CF-Talk 
  Sent: Wednesday, July 30, 2003 1:00 PM
  Subject: [cftalk] calculating the date and time.


  not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the 
result to be 
  (29 Jul 2003 11:00 - 30 Jul 2003 10:59)


  CFIF LookingAt IS Day
  
  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,
  0)
  
  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
  /CFIF
  

  - Original Message - 

  From: ColdFusion Programmer 

  To: CF-Talk 

  Sent: Wednesday, July 30, 2003 12:48 PM

  Subject: [cftalk] calculating the date and time.
  
  

  Spot on Allan, this is what I was trying to do. Can you show me how to 
  calclulate the from-to date time in the last 24 hours
  

  In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)
  

  Many Thanks

  Allan
  

  CFIF LookingAt IS Week

  

  CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,
  59,

  0)

  

  CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))

  /CFIF

  

  I haven't tested this so there maybe small errors but something like 
  

  this??
  
  

  - Original Message - 
  
  

  From: ColdFusion Programmer 
  
  

  To: CF-Talk 
  
  

  Sent: Wednesday, July 30, 2003 12:24 PM
  
  

  Subject: [cftalk] calculating the date and time.

  

  
  
  

  How do I get the calculate the from time to start at 01:00 am and the 
  

  to time to end at 00:59 am. Can you please show me how to get the 
  date 

  and time in the format mentioned below

  
  
  

  In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)

  

  
  
  

   I was hoping somebody could help me. I'm trying to
  
  

   display the date and time. This is how I want to
  
  

   display it:
  
  

  
  
  

   If the current time is 10:05, I want to display the
  
  

   time in this format:
  
  

  
  
  

   In the last hour (09:05 - 10:04)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  
  

   09:59)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  
  

   00:59)
  
  

  
  
  

   If the current time is 10:05 and the date is 30.July,
  
  

   I want to display the date time in this format:
  
  

  
  
  

   In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  
  

   00:59)
  
  

  
  
  

  Look into DateAdd() - you can add any amount of time to a date, 
  from
  
  

  seconds to years
  
  

  
  
  

  If you want to remove 7 days, you can just do DateAdd(d, -7, 

  Now())
  
  

  
  
  

  Hope this helps
  
  

  
  
  

  
  
  

  
  
  

  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: [cftalk] calculating the date and time.

2003-07-30 Thread Philip Arnold
 not quite as I was expecting. Take the current time, its
 11:55 am GMT, I want the result to be
 (29 Jul 2003 11:00 - 30 Jul 2003 10:59)

Do you want it from the end of the previous hour?


BTW, the reason I pointed you at DateAdd() and no further is that you
should be able to work it out for yourself

If you ask for people to do all of your difficult coding for you, then
you'll never learn how to do it for yourself, and rely on others all of
the time

This isn't particularly hard, and once you have one solution, you should
be able to expand it to work for all of them

It's a lot better for you to work out how to do things from a nudge in
the right direction than to have people always give you the solution



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
Thank you Allan for helping me out with this, I know this is stuff I should be doing, 
I just don't have the time to put my focus on this, am doing multiple tasks at the 
same time. Appreciate your comments Phillip but as I say having to work under a lot of 
stress

Thanks guys

It is just a matter of paying with the individual time values to get 
what you need.
The hour is always 59 minutes past the current hour minus 1.

CFIF LookingAt IS Day

CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),
Hour(DateAdd(H,-1,Now(,59,0)

CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
/CFIF


  
- Original Message - 
  
From: ColdFusion Programmer 
  
To: CF-Talk 
  
Sent: Wednesday, July 30, 2003 1:00 PM
  
Subject: [cftalk] calculating the date and time.


  
not quite as I was expecting. Take the current time, its 11:55 am GMT, 
I want the result to be 
  
(29 Jul 2003 11:00 - 30 Jul 2003 10:59)


  
CFIF LookingAt IS Day
  

  
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,
59,
  
0)
  

  
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today))
  
/CFIF
  



  
- Original Message - 


  
From: ColdFusion Programmer 


  
To: CF-Talk 


  
Sent: Wednesday, July 30, 2003 12:48 PM


  
Subject: [cftalk] calculating the date and time.
  

  



  
Spot on Allan, this is what I was trying to do. Can you show me how 
to 
  
calclulate the from-to date time in the last 24 hours
  



  
In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59)
  



  
Many Thanks


  
Allan
  



  
CFIF LookingAt IS Week


  



  
CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),0,

  
59,


  
0)


  



  
CFSET LastWeek = DateAdd(N,1,DateAdd(D,-7,Today))


  
/CFIF


  



  
I haven't tested this so there maybe small errors but something like 

  



  
this??
  

  



  
- Original Message - 
  

  



  
From: ColdFusion Programmer 
  

  



  
To: CF-Talk 
  

  



  
Sent: Wednesday, July 30, 2003 12:24 PM
  

  



  
Subject: [cftalk] calculating the date and time.


  



  

  

  



  
How do I get the calculate the from time to start at 01:00 am and 
the 
  



  
to time to end at 00:59 am. Can you please show me how to get the 
  
date 


  
and time in the format mentioned below


  

  

  



  
In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59)


  



  

  

  



  
 I was hoping somebody could help me. I'm trying to
  

  



  
 display the date and time. This is how I want to
  

  



  
 display it:
  

  



  

  

  



  
 If the current time is 10:05, I want to display the
  

  



  
 time in this format:
  

  



  

  

  



  
 In the last hour (09:05 - 10:04)
  

  



  

  

  



  
 If the current time is 10:05 and the date is 30.July,
  

  



  
 I want to display the date time in this format:
  

  



  

  

  



  
 In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003
  

  



  
 09:59)
  

  



  

  

  



  
 If the current time is 10:05 and the date is 30.July,
  

  



  
 I want to display the date time in this format:
  

  



  

  

  



  
 In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003
  

  



  
 00:59)
  

  



  

  

  



  
 If the current time is 10:05 and the date is 30.July,
  

  



  
 I want to display the date time in this format:
  

  



  

  

  



  
 In the last 30 days (30 Jun 2003 01:00 - 30 Jul 2003
  

  



  
 00:59)
  

  



  

  

  



  
Look into DateAdd() - you can add any amount of time to a date, 
  
from
  

  



  
seconds to years
  

  



  

  

  



  
If you want to remove 7 days, you can just do DateAdd(d, -7, 


  
Now())
  

  



  

  

  



  
Hope this helps
  

  



  

  

  



  

  

  



  

  

  



  
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4