PDA

View Full Version : Making an advanced date


Jemini
09-16-2008, 02:40 AM
Hello. I am trying to find a code that will show a future date from the current date. For example, from today (9/15/08) I want to show a future date that is 30 days later (or however many I want to choose). Im using this simple date HTML:

<%=Date()%>

What would be the code to display the date that is x number days ahead from today's date?

edbr
09-16-2008, 02:55 AM
Can only say in php , but here some examples
<?php
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
$nextyear = mktime(0, 0, 0, date("m"), date("d"), date("Y")+1);
?>
Not sure it will help but it might

domedia
09-16-2008, 03:07 AM
Im using this simple date HTML:

<%=Date()%> That is not HTML ..:(