VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



formating Date for Web

by bugor (5 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Tue 20th November 2001
Date Added: Mon 8th February 2021
Rating: (2 Votes)

formating Date for Web

Rate formating Date for Web



if Not IsDate(sDate) then exit function
sYear=Year(sDate)
if Len(sYear)<3 then sYear="20" & sYear 
sMonth=Month(sDate)
if Len(sMonth)<2 then  sMonth="0" & sMonth
sDay=Day(sDate)
if Len(sDay)<2 then sDay="0" & sDay
sDate=sYear & "-" & sMonth & "-" & sDay 'you can change sequence of arguments and delimiter
GetDate=sDate
end function

Download this snippet    Add to My Saved Code

formating Date for Web Comments

No comments have been posted about formating Date for Web. Why not be the first to post a comment about formating Date for Web.

Post your comment

Subject:
Message:
0/1000 characters