Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-14-2005, 12:53 PM Display current time
VegaLA's Avatar
Skilled Talker

Posts: 64
Trades: 0
Hi everyone,
this is something I thought would have been already covered but a quick search comes up with nothing (unless i'm doing something wrong) I am trying to display the current time on the site and having looked around I found this code

Response.Write FormatDateTime("12/23/2003 8:24 AM",vbShortTime)
but of course it just displays the 8.24 constantly.. no surprise there then.
Does anyone know what i need to add to this in order for it to display the current time ?

Thanks in advance,
Craig.....
VegaLA is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-14-2005, 04:25 PM
Kaiman's Avatar
Extreme Talker

Posts: 237
Trades: 0
You could also use Javascript to do the same thing so when the pages load in the client browser it shows up. Something like this for example:


<script language="JavaScript" type="text/JavaScript">

var now = new Date();
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thu rsday','Friday','Saturday');
var months = new Array('January','February','March','April','May',' June','July','August','September','October','Novem ber','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
document.write("" +today+ "");

</script>
Kaiman is offline
Reply With Quote
View Public Profile
 
Old 04-15-2005, 04:10 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Response.Write FormatDateTime(Now(), vbShortTime)
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to Display current time
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.35998 seconds with 12 queries