Quick Search for:  in language:    
want,date,function,continental,style,english,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 203,988. lines
 Jobs: 110. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
aZoaPeS
By Simeon Albertson on 1/20


Move Window , Funs Stuff
By Jareh Ali Mohamed H. Al-Malki on 1/19


Click here to see a screenshot of this code!Rapid Classified v2.0
By Gurgen Alaverdian on 1/17

(Screen Shot)

Click here to see a screenshot of this code!Gallery Image with Zoom
By Marcelo Valle Franco on 1/12

(Screen Shot)

Click here to see a screenshot of this code!ASP Photo Competition
By Saul Bryan on 1/12

(Screen Shot)

Execute DTS package
By Himadrish Laha on 1/12


Connecting to a MySQL with ADO, DAO and RDO
By Ahmed Magdy Ezzeldin on 1/11


Automatic Form Insertion To Database
By Yasar Bayar on 1/11


Click here to see a screenshot of this code!Find Closest Physical Location (based on zip code, etc)
By Mark Kahn on 1/11

(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!

Affiliate Sites



 
 
   

uk date format

Print
Email
 
VB icon
Submitted on: 8/31/2003 1:18:44 PM
By: dominic doherty 
Level: Beginner
User Rating: By 1 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this code 2533 times.
 
 
     if when you want to use the date function and you do not want the continental style but the english then this code sorts it for you. very simple and easy to understand
 
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: uk date format
    ' Description:if when you want to use th
    '     e date function and you do not want the 
    '     continental style but the english then t
    '     his code sorts it for you. very simple a
    '     nd easy to understand
    ' By: dominic doherty
    '
    'This code is copyrighted and has    ' limited warranties.Please see http://w
    '     ww.Planet-Source-Code.com/vb/scripts/Sho
    '     wCode.asp?txtCodeId=8523&lngWId;=4    'for details.    '**************************************
    
    Dim datetoday
    'this is the variable that is made from 
    '     the 
    'other three variables below. insert thi
    '     s 
    'variable in your code where you want th
    '     e
    'date to be displayed
    Dim nowday 'variable For today
    Dim nowmonth 'variable For current month
    Dim nowyear 'variable For current year
    nowday =DatePart("D", Date) 'gets day number
    nowmonth=DatePart("M", Date) 'gets month number
    nowyear= DatePart("YYYY", Date) 'gets year
    if nowday >=10 Then
    datetoday = nowday & "/" & nowmonth& "/"& nowyear
    Else nowday = "0" & nowday
    'if the day number is less than 10 then 
    '     a 0 is 
    'added infornt ie 8 goes to 08
    End if 
    'the same is true below but for month nu
    '     mber
    if nowmonth >=10 Then 
    datetoday = nowday & "/" & nowmonth& "/"& nowyear
    Else nowmonth = "0" & nowmonth
    datetoday = nowday & "/" & nowmonth& "/"& nowyear
    End if
    'now you just insert the date where you 
    '     want ie
    response.write datetoday
    'just trying to help beginners with smal
    '     l problems
    hope it is helpful

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
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

 There are no comments on this submission.
 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

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.
 
Name:
Comment:

 

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 | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 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.