cinek Posted March 12, 2008 Share Posted March 12, 2008 is it poss to display only the date using javascript? e.g. 12th March 2008 not 12th March 2008 <time/time zone> ? Link to comment Share on other sites More sharing options...
Management terabyte Posted March 13, 2008 Management Share Posted March 13, 2008 Try checking those tutorials:http://javascript.about.com/library/bldtime2.htmhttp://www.dicabrio.com/javascript/time-zone-clock.phphttp://www.spip-contrib.net/Display-date-and-time-in-the Board Rules - Available Products - Need a Custom Work? < Don't PM me for support, post in the forum or submit a ticket from the client area instead! > Link to comment Share on other sites More sharing options...
MPFF Posted March 14, 2008 Share Posted March 14, 2008 It's a simple javascript place the code below were you want it <script type="text/javascript"> <!-- var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear() document.write(day + "/" + month + "/" + year) //--> </script> Link to comment Share on other sites More sharing options...
cinek Posted March 14, 2008 Author Share Posted March 14, 2008 (edited) thanks :lol: what if i want to save this in another file (*.js)? how can I import it to my index.html ? I tried the <script type="text/javascript" src="date.js"></script> but it doesn't show :) Edited March 14, 2008 by cinek Link to comment Share on other sites More sharing options...
MPFF Posted March 14, 2008 Share Posted March 14, 2008 yeah ya can do that open notepad and copy the following Copy & Paste var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear() document.write(day + "/" + month + "/" + year) File Save As date.js Upload and just Place <script type="text/javascript" src="date.js"></script> were u want it :lol: enjoy Link to comment Share on other sites More sharing options...
cinek Posted March 14, 2008 Author Share Posted March 14, 2008 got it to work, silly mistake hehe thanks a lot :lol: Link to comment Share on other sites More sharing options...
MPFF Posted March 14, 2008 Share Posted March 14, 2008 anytime :lol: happy to help Link to comment Share on other sites More sharing options...
Management terabyte Posted March 14, 2008 Management Share Posted March 14, 2008 The issue/request this topic was opened for has now been resolved. If you need further assistance, please open a new topic. If this topic was closed prematurely, please contact me so I can re-open it. :lol: Topic Closed Board Rules - Available Products - Need a Custom Work? < Don't PM me for support, post in the forum or submit a ticket from the client area instead! > Link to comment Share on other sites More sharing options...
Recommended Posts