Classic ASP Function equivalent to PHP's

Settyness

New Member
Uusing PHP and ASP on a project. A form in PHP captures the day, month and year of a birth date. Then it's inserted into a database as the variable currentSeconds. I can get the years from variable $currentSeconds in PHP no problem using the 2nd code snippet1st Code Snippet\[code\]$day=$_POST[day];if ($day<10){$day="0".$day;}$currentSeconds = strtotime($day." ".$_POST[month]." ".$_POST[year]);\[/code\]2nd Code Snippet\[code\]$nYears = date('Y',time()-$currentSeconds)-1970;\[/code\]How can I get the number of years using $currentSeconds variable, but under classic ASP? For this example $currentSeconds = 136612800, which should give the number of years as 36.Thanks in advance
 
Back
Top