> 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=subscribe&forumid=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