ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 23rd, 2005, 07:58 PM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 5
Two Time Questions

How can i make it so if the hour is 'even' this happens.. and if the hour is 'odd' something else happens..

also if the time is between 11:00 and 11:10 I want it to display a message..

don't have any experience with date/time except the basic formats..

Reply With Quote
  #2  
Old March 23rd, 2005, 10:11 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
first part


<cfset getHour = DatePart("h", now())>
<cfoutput>#getHour#</cfoutput>
<cfif getHour MOD 2 EQ 0>
even hour
<cfelse>
odd hour
</cfif>

Reply With Quote
  #3  
Old March 23rd, 2005, 10:16 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
<cfset getHour = DatePart("h", now())>
<cfset getMin = DatePart("n", now())>
<cfoutput>#getHour#, #getMin#</cfoutput>
<cfif getHour MOD 2 EQ 0>
even hour
<cfelse>
odd hour
</cfif>
<cfif getHour EQ 11>
<cfif getMin GT 0 and getMin LT 11>
now is the time to do something
</cfif>
</cfif>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Two Time Questions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway