You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial). Because of this, it is possible that our website may not appear correctly in your browser. We apologise for the inconvenience, and recommend you upgrade your browser to one which is compatible with CSS. For more information, please visit our Browser Upgrade page.

4WebHelp

Scripts: PHP: Date

This script will output the current date in the following format: Friday 20th April 2001 07:59 PM.

Demo

<?php

###########################################################################
#                                                                         #
# Neither http://www.4webhelp.net/ nor its members accept any             #
# responsibility, either expressed or implied, for any damage caused by   #
# using this script or the misuse of this script.                         #
#                                                                         #
#                                                                         #
#                          INSTRUCTIONS                                   #
#                                                                         #
# 1) Copy this code to an editor such as Notepad and save it with a       #
# .php  extension.                                                        #
# 2) FTP this file to a folder on your site in ASCII mode                 #
# 3) Call up this file in your web browser to see the date                #
#                                                                         #
###########################################################################

print (date("l d<\sup>S</\sup> F Y h:i A"));

?>

<p>This script courtesy of <a href="http://www.4webhelp.net/">4WebHelp</a>.</p>
Latest comments
Name: madhuEmail none
hi .i am developing a project ion php.pls tell me how to change a string in to date format
Name: niivnduwwhEmail gznqi at ltreqja dot com
Hi! Very nice site! Thanks you very much! fshljujjdnm
Name: gaydarsfEmail gaydarsf at yahoo dot com
i have phpbb and would like to know how did you manage the last post column to this "1 month, 2 weeks ago"

Thanks Smile
Name: DanielEmail use contact form
Yes, you can.

The different format options are at http://www.php.net/date
Name: badgerEmail b at dger dot org dot uk
Can I change the display format for the date?

I would like just the day of the week and the date.

Thanks

b@dger

Add a new comment

This page is © Copyright 2002-2017, 4WebHelp. It may not be reproduced without 4WebHelp's prior permission.