All source code in ASP/ VbScript Ask a ASP/ VbScript Pro Discussion Forum Categories All jobs in ASP/ VbScript
Quick Search for:  in language:    
code,only,puts,current,Date,Time,your,website
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 281,486. lines
 Jobs: 101. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login

NEW! LEARNING CENTER
Special educational offers, white papers, webcasts, podcasts

  NEW! Download Rational Performance Tester V8 (download now)
  NEW! Download Rational Functional Tester V8 (download now)
  NEW! Download Rational Service Tester for SOA Quality V8 (download now)
  NEW! Teleconference: Quality In Action - Using Rational Quality Manager with Functional, Performance and Web Service Testing Products (download now)
  NEW! Introducing IBM Rational AppScan Developer Edition – easing security testing by non-security professionals (download now)

 

 


Latest postings for ASP/ VbScript.
Click here to see a screenshot of this code!Mess Officer Management System (Sistem Pengurusan Mess Pegawai)
By Mohd Fauzi on 11/23

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!



 
 
   

Basic Date & Time Script

Print
Email
 
VB icon
Submitted on: 12/2/2000 1:07:42 PM
By: Daniel Larsson  
Level: Beginner
User Rating: By 5 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this code 25224 times.
 
author picture
(About the author)
 
     This code only puts the current Date & Time on your website. IT's very simple, BUT I haven't found it anywhere else on this site, so I decided to put this script up for you!
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    '**************************************
    ' for :Basic Date & Time Script
    '**************************************
    You can use this script free, no copyrights, since it's very very simpel.
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    '**************************************
    ' Name: Basic Date & Time Script
    ' Description:This code only puts the cu
    '     rrent Date & Time on your website. IT's 
    '     very simple, BUT I haven't found it anyw
    '     here else on this site, so I decided to 
    '     put this script up for you!
    ' By: Daniel Larsson
    '
    ' Assumes:Basically nothing, just copy/p
    '     aste.
    '
    ' Side Effects:That this script takes th
    '     e current time from the IIS server the .
    '     asp file is on and prints it to your web
    '     -page. This measn the date&time isn't th
    '     e same as your country as long as the se
    '     rver isn't in the same country as yours.
    '     
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/vb/scripts/Sho
    '     wCode.asp?txtCodeId=6398&lngWId=4    'for details.    '**************************************
    
    <HTML>
    <BODY>
    <%
    Dim DatumTid
    DatumTid=Now
    %>
    The current Date and time is: <%=DatumTid%>
    </BODY>
    </HTML>


Other 8 submission(s) by this author

 

 
 Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/3/2000 1:34:14 AMDimNull

I really am at a loss as to why you would post this here. Really, and I writng this because I think maybe I missed something, and with respect to you the author but why not just put:
Response.Write(Now)
(If this comment was disrespectful, please report it.)

 
12/3/2000 9:59:18 AMDaniel Larsson

Yes I know, but like I said, I hadn't found this simple script here so thats why I put it up. Remember, there are hundreds of ways to display time&date, i just put up the most regular one.
(If this comment was disrespectful, please report it.)

 
12/8/2000 3:28:51 AMpeter

Hey ,Try this
a=2 b=3 c =2000

d= CDate(a
(If this comment was disrespectful, please report it.)

 
12/12/2000 1:30:51 PMDave

I think this is a fine example of using a variable and then displaying it's value. This may not be the ideal way to write a date/time function but that's not the point. This is a tutorial. Thanks Dan.
(If this comment was disrespectful, please report it.)

 
12/13/2000 12:18:01 PMDaniel Larsson

Yes I know, thanks for reading =). This is like you said, a good variable example that recieves the actual time & date from the IIS server =).
(If this comment was disrespectful, please report it.)

 
3/7/2001 3:57:41 PMisrael

I think is great, but I need some help, what I need is that, I got two textboxs, and one is for began date and the other one is for final dates, so, what I have to prove, if you put began date 2000, and final date 1998, as you can see this could not happend so, tell me what to do in some asp code for dates, you can write me at isra21@rocketmail.com thanks for your help
(If this comment was disrespectful, please report it.)

 
7/28/2002 6:51:20 PMDound

actually, this helped me :/
(If this comment was disrespectful, please report it.)

 
4/10/2004 8:38:47 PM

Thanks! It's simple code, but it helped me.
(If this comment was disrespectful, please report it.)

 
1/8/2005 3:00:35 PMChrisBerry

Wow, that was a waste of time man
(If this comment was disrespectful, please report it.)

 
7/22/2006 9:12:05 PMAnyone got a Atomic Time

Can anyone tell me how to take the time off www.nist.gov in asp?
(If this comment was disrespectful, please report it.)

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
To post feedback, first please login.


 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | Open Letter from Moderators | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997-2008 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.   Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.