Re: Count Down(How to find server date)
- From: "Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx>
- Date: 29 Aug 2008 15:06:40 GMT
wrote on 29 aug 2008 in microsoft.public.scripting.jscript:
I have to make a count down program from of 22 october 2208. I did
it but it takes system date. it is running on website. suppose any
body change their system date then it shows countdown date on the
basis of current date. So how can it be possible that it should take
server date. It should not affected by sysetm date.
Try serverside programming.
Example in ASP-jscript,
disregarding possible summer time [dst] differences:
<script language = 'jscript' runat = 'server'>
var d2 = new Date(2208,10,22);
var d1 = new Date();
var dif = Math.floor((d2-d1)/864e5);
Response.write(dif + ' days, and counting ....');
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.
- Follow-Ups:
- Re: Count Down(How to find server date)
- From: Dr J R Stockton
- Re: Count Down(How to find server date)
- Prev by Date: Re: IE8 - jscript - layers
- Next by Date: Re: Count Down(How to find server date)
- Previous by thread: IE8 - jscript - layers
- Next by thread: Re: Count Down(How to find server date)
- Index(es):