|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to add 4 hours in datetime
hi guys ,
need help on this... how can I add another 4 hours in my current time? if example my varTime = Now() , returns 10:04:AM and then I want to add 4 hours on it... so my result will be 02:04 PM. Then I can add it now on my database..... my table field is in "datetime" thanks in advance. |
|
#2
|
|||
|
|||
|
is this it.Sorry if its wrong
Code:
dateadd("h", 4, now())
|
|
#3
|
|||
|
|||
|
Yes, you want to use dateAdd(). This is all explained in the docs which is why I always urge people to read the docs before posting.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > how to add 4 hours in datetime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|