|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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.. |
|
#2
|
|||
|
|||
|
first part
<cfset getHour = DatePart("h", now())> <cfoutput>#getHour#</cfoutput> <cfif getHour MOD 2 EQ 0> even hour <cfelse> odd hour </cfif> |
|
#3
|
|||
|
|||
|
<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> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Two Time Questions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|