Skip to main content
Inspiring
May 5, 2006
Question

DoDateTime

  • May 5, 2006
  • 2 replies
  • 670 views
Hi All,
Can sombody help me with some date formating please? I have a database with
dates in it. I have a recordset which displays the date as day, date, year
eg 'Saturday, May 06, 2006' using
<%= DoDateTime((events.Fields.Item("StartDate").Value), 1, 1033) %>

I would like to display 'Saturday, 6th May' and lose the year (or at least
just lose the year and display 'Saturday, May 06' if that's easier!)
Is this possible, can anyone help?

Thanks
Ian


This topic has been closed for replies.

2 replies

Inspiring
May 5, 2006
Thanks, will try soon as i get chance.


"Piers 2k" <fake@msn.com> wrote in message
news:e3frp2$ppk$1@forums.macromedia.com...
> There's no built in function or any other argument to do it automatically.
> You have to pull each part out separately, and format if necessary.
> This should do (making changes for date field):
>
> <%
> Dim DateFieldName
> Result = WeekDayName( DatePart("w",DateFieldName) ) & ", "
> Result = Result & Day(DateFieldName) & " "
> Result = Result & MonthName( Month(DateFieldName) )
> Response.Write(Result)
> %>
>
> Have a look at the Date functions:
> http://www.w3schools.com/vbscript/vbscript_ref_functions.asp#date
>
> HTH,
> Piers
>
>


Inspiring
May 5, 2006
There's no built in function or any other argument to do it automatically.
You have to pull each part out separately, and format if necessary.
This should do (making changes for date field):

<%
Dim DateFieldName
Result = WeekDayName( DatePart("w",DateFieldName) ) & ", "
Result = Result & Day(DateFieldName) & " "
Result = Result & MonthName( Month(DateFieldName) )
Response.Write(Result)
%>

Have a look at the Date functions:
http://www.w3schools.com/vbscript/vbscript_ref_functions.asp#date

HTH,
Piers