Link to home
Start Free TrialLog in
Avatar of chandua
chandua

asked on

Active Server Pages - Quick Calender

Hi,

iam using Quick Calender in few of my web pages.
when i select the date from the calender it takes the system date format.how do i format the date to the format i want after selecting from the calender.


pls help.

thanx..
ASKER CERTIFIED SOLUTION
Avatar of nilapenn
nilapenn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fritz_the_blank

This function converts the current date to a more user friendly format:

sub NiceDate()

dim strDay, strMonth, strYear
strDay = Day(Date())
strMonth = Month(Date())
strYear = Year(Date())
if Int(strDay) <=9 then
     strDay = "0" & strDay
end if
if Int(strMonth) <=9 then
     strMonth = "0" & strMonth
end if

MsgBox strMonth & "/" & strDay & "/" &strYear
end sub

You could also pass the date as a parameter:


sub NiceDate(dDate)

dim strDay, strMonth, strYear

strDay = Day(dDate)
strMonth = Month(dDate)
strYear = Year(dDate)
if Int(strDay) <=9 then
     strDay = "0" & strDay
end if
if Int(strMonth) <=9 then
     strMonth = "0" & strMonth
end if

MsgBox strMonth & "/" & strDay & "/" &strYear
end sub

Avatar of Moondancer
Moondancer

47 questions asked, only 22 closed.... ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.
This question appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, you must tell the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below, include the question QID/link.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and update/finalize them all.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20223690
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20265178
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20265195
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20274444
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20275198
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20180838
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20133711
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20267928
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20272203
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20268833
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20273717
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20271488
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20271453
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20266279
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20264617
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20258796
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20257478
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20255754
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20255748
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20242197
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20214627
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193125
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20181410
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20148274
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20008099

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
Split or to nilapenn.

Fritz the Blank
Points for fritz_the_blank -> https://www.experts-exchange.com/jsp/qManageQuestion.jsp?qid=20280166

Thanks, sorry you both had to wait sooooooo long.

Moondancer - EE Moderator