jeffery1493 Posted January 17, 2007 Share Posted January 17, 2007 Hi All,I have been trying code snippets all over the web, trying to print the current date on my web page in this format:Thursday, January 12th, 2007All of them use JavaScript, all use document.write, and none of them work. They just simply display a blank page. Most of the code snippets say simpy "Paste this in your document"Does anyone know what is going on? Thanks,JEFFERY1493 Link to comment https://forums.phpfreaks.com/topic/34525-getting-a-full-date-to-print/ Share on other sites More sharing options...
paul2463 Posted January 17, 2007 Share Posted January 17, 2007 I take it you want to do it in PHP as this is a PHP help forumtry this[code]<?php$now = strtotime("now");$today = date("l, F jS, Y", $now);echo $today; // Wednesday, January 17th, 2007?>[/code] Link to comment https://forums.phpfreaks.com/topic/34525-getting-a-full-date-to-print/#findComment-162655 Share on other sites More sharing options...
jeffery1493 Posted January 17, 2007 Author Share Posted January 17, 2007 YES, thanks you got me in the right direction.Well, it's a #?$ of alot easier to do it in PHP. :P My app is in PHP, this is just one of a few HTML front pages. I imagine I'll have to convert the whole page over, probably would be easier to do that, then get a simple date to work in HTML underneath.At least, when I'm driving. Link to comment https://forums.phpfreaks.com/topic/34525-getting-a-full-date-to-print/#findComment-162661 Share on other sites More sharing options...
jeffery1493 Posted January 17, 2007 Author Share Posted January 17, 2007 Here's something interesting:http://www.visitor-stats.com/articles/convert-html-website-php.php Link to comment https://forums.phpfreaks.com/topic/34525-getting-a-full-date-to-print/#findComment-162666 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.