ASP VbScript Format Date

Dear Experts

I am returning a date record from a recordset into an update form.  as per code below.

The date displys correctly, however after the update it seems to change to US style MM/DD/YYYY.

Ideally I would like to display the date in the update form in the format mmm-dd-yyyy.  Is it possible to format the date this way in the form.

Thanks



<%=(enquiry.Fields.Item("eDate").Value)%>

Open in new window

grantballantyneAsked:
Who is Participating?
 
synxConnect With a Mentor Commented:
I'm not aware of a built-in format for mm-dd-yyyy (the FormatDateTime function doesn't allow that option from what I can see.  Details here: http://www.w3schools.com/VBscript/func_formatdatetime.asp#format)

I think you may need to do the formatting "manually."  Break the date into month, day, and year using the DatePart function, then concatenate them back together with '-' between them.  Here's an example:
http://psacake.com/web/fr.asp
0
 
grantballantyneAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.