The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I'm trying to build a simple countdown and I'm hitting a snag when comparing dates. I've got db fields for dates that appear like this: 01-14-2005. I can split the date to 01/14/2005 or 2005-01-14 all with no problem. By default they are 2005-01-14 and I've split them to 01-14-2005. I want to compare that date with the date("m-d-Y") php function and print the difference on a page I've tried a simply subtraction command: PHP Code:
PHP Code:
01-21-2005 01-14-2005 But the $ct variable returns 0 instead of the 7 I'd expect. Any help would be appreciated. Also, since my db field does not track time (hour minute seconds) is there a way I can get a constant like 12:00 am to compare to the current time with mktime(); ? Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|