navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Current Date And Time Installation

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> Computer Software and Hardware issues >> Current Date And Time Installation
Page: [1]
 
SilverHD

 

Posts: 2
Joined: 12/12/2004
Status: offline

 
Current Date And Time Installation - 12/12/2004 21:11:05   
Can someone tell me how to install the current date and time via FrontPage 2002? Or for that matter any way that you know.

Thanks much,

Silver
Larry M.

 

Posts: 2711
Joined: 2/20/2003
From: Greenville, South Carolina, USA
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 10:11:55   
Silver,

The script below displays as Month/Day/ (space) Hour/Minute a.m. or p.m.

Copy Script, Position cursor then >>Insert >>Web Component >>Advanced Controls >>HTML >>Paste Script. Will display in Preview Mode prior to Publishing.

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
Stamp = new Date();
year = Stamp.getYear();
if (year < 2000) year = 1900 + year;
document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+ year + '</B></font><BR>');
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " P.M.";
}
else {
Time = " A.M.";
}
if (Hours > 12) {
Hours -= 12;
}
if (Hours == 0) {
Hours = 12;
}
Mins = Stamp.getMinutes();
if (Mins < 10) {
Mins = "0" + Mins;
}
document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>');
// End -->
</SCRIPT>


_____________________________

Larry M.

Indecision is the Key to Flexibility.

(in reply to SilverHD)
SilverHD

 

Posts: 2
Joined: 12/12/2004
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 14:31:16   
Thanks Larry, your help is appreciated!

Silver

(in reply to SilverHD)
Larry M.

 

Posts: 2711
Joined: 2/20/2003
From: Greenville, South Carolina, USA
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 14:44:39   
quote:

Thanks Larry, your help is appreciated!


SilverHD,

You are most welcome:).

Get back to us for "fine tuning" if you need to modify this script with changes to the font style/size and/or color.

Correction: the above script will Display as Month/Day/Year (space) Hour/Minute (a.m. or p.m.)

_____________________________

Larry M.

Indecision is the Key to Flexibility.

(in reply to SilverHD)
dpf

 

Posts: 7121
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 14:48:42   
Larry's script does some nice formating. a simpler way is just this
quote:

Stamp = new Date();
document.write(Stamp):

it would return(print) this:
Mon Dec 13 14:45:15 EST 2004

_____________________________

Dan

(in reply to SilverHD)
Larry M.

 

Posts: 2711
Joined: 2/20/2003
From: Greenville, South Carolina, USA
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 14:50:56   
Dan,

Looks neat. How/where do you insert?

_____________________________

Larry M.

Indecision is the Key to Flexibility.

(in reply to dpf)
dpf

 

Posts: 7121
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 15:03:07   
Larry: put this in your page where you want it.
<script type="text/javascript" language="javascript"
Stamp = new Date();
document.write(Stamp):
</script>

for example, this code
<html>
<head>
<title>JavaScript Test</title>
</head>
<body  >
<h1> Todays date is 
<script type="text/javascript">
<!--
stamp = new Date();
document.write(stamp);


//-->
</script>
</h1>
</body>
</html>
produced this
Todays date is Mon Dec 13 14:50:07 EST 2004


_____________________________

Dan

(in reply to Larry M.)
Larry M.

 

Posts: 2711
Joined: 2/20/2003
From: Greenville, South Carolina, USA
Status: offline

 
RE: Current Date And Time Installation - 12/13/2004 20:01:10   
Dan,

Slick!

_____________________________

Larry M.

Indecision is the Key to Flexibility.

(in reply to dpf)
Page:   [1]

All Forums >> Community >> Computer Software and Hardware issues >> Current Date And Time Installation
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts