|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Date Calculation, help plz!!
Hi, i am designing a password control system with Coldfusion, described as follows:
- a user, has 2 days for its password to expire - a admin has infinite password expiration date So when i create a new accout, i have to declare if it is admin or user and i want it so that a expiration date is automatically calculated based on the actual date "today()". In other words, if the account is for an admin, it will post "never" if the account is for a user, it will add "+2 days or + 42hours" to the current date/time. (e.g. Current date = 01/11/2004, it will post "03/11/2004" on the MySQL database, Expiry Date column) Do you think you can help me?? thank you in advance! |
|
#2
|
||||
|
||||
|
try and use the DateDiff() function, look for it online in the macromedia live docs. i used it for a similar purpose on a "whos online" type of thing i did and it worked out quite well...
|
|
#3
|
|||
|
|||
|
Yes, this is what dateAdd(), dateDiff() and all the other date functions are for. They're covered in the docs.
__________________
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 |
|
#4
|
|||
|
|||
|
Again thx for the help, this worked quite well!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Date Calculation, help plz!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|