Convert String to Date : Data Type Convert : Language Basics PHP Source Code


PHP Source Code » Language Basics » Data Type Convert »

 

Convert String to Date




<HTML>
<BODY>
<FORM METHOD="POST" ACTION="CallMe.php">
    <TABLE>
    
    <TR>
    Date:<BR>
    <TD><INPUT TYPE="TEXT" NAME="DATE" VALUE="<?php echo $DATE ?>"></TD>
    </TR>
    
    <TR>
    <TD ALIGN="CENTER">+</TD>
    </TR>
    
    <TR>
    <TD><INPUT TYPE="TEXT" NAME="OFFSET" VALUE="<?php echo $OFFSET ?>"></TD>
    </TR>
    
    <TR>
    <TD ALIGN="CENTER"><INPUT TYPE="SUBMIT" VALUE="="></TD>
    </TR>
    
    <TR>
    <TD><INPUT TYPE="TEXT" NAME="RESULT" 
      VALUE="<?php echo date("M j, Y",(strtotime($DATE)+60*60*24*($OFFSET))) ?>" disabled></TD>
    </TR>
    
    </TABLE>
</FORM>
</BODY>
</HTML>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Data Type Convert