Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date in ASP

Status
Not open for further replies.

LaPluma

Programmer
Joined
Feb 3, 2002
Messages
139
Location
DE
Hello

I understand that this date statement Response.Write(Month(Date) & "/" & Day(Date) & "/" & Year(Date)) will produce
the date in this order:

12/4/98

To me, this is the 12th April 98 and I don't know anybody who would think otherwise.

How can I amend this so that the date reads: 12th April 1998? That is, with the th (third), st (first), and nd (second) and in that order (that is: day then month, then year)? I would also like the year to be in full: 1998 and not 98.

Finally, is there a way of setting the font, and style, and colour?

Many thanks to all.

Best wishes.
 
<script language=&quot;vbscript&quot;>
sub formatDate()

DateToday = MonthName(Month(date())) & &quot;, &quot; & Day(Date()) & &quot;, &quot; & Year(Date())


alert DateToday
end sub I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Sorry didn't clarify this. just change to the famous <% %> etc.
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
in regords to setting the color etc. jsut response.write the settings before you write the date and it will take effect.
response.write(&quot;<FONT FACE=COURIER&quot;)
response.write(&quot;SIZE=12pt&quot;) and so on until
response.write(DateToday) I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Hello onpnt

Many thanks for your post.

I'll get down to work right away!

Best wishes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top