db date formatting

M

mettá

Some time ago I managed to get dates to display like this;

Wednesday 29 April 2009

The code to do this is;

<% =WeekdayName(Weekday
(CDate(FP_FieldVal(fp_rs,"from1"))))%>&nbsp;<%=FormatDateTime(CDate(FP_FieldVal(fp_rs,"from1")),
vbLongDate)%>

However I would like to do this;

Wed 29 Apr 2009

Can anyone help
M
 
M

Mike Mueller

This is not an out-of-box format, and would need to be a custom written
function
 
S

Stefan B Rusynko

Just add the optional abbreviate parameter as true to your WeekdayName code
See http://www.devguru.com/technologies/vbscript/quickref/weekdayname.html

<% =WeekdayName(Weekday(CDate (FP_FieldVal(fp_rs,"from1"))),true)%>
&nbsp;
<%=FormatDateTime(CDate(FP_FieldVal(fp_rs,"from1")), vbLongDate)%>


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Some time ago I managed to get dates to display like this;
|
| Wednesday 29 April 2009
|
| The code to do this is;
|
| <% =WeekdayName(Weekday
| (CDate(FP_FieldVal(fp_rs,"from1"))))%>&nbsp;<%=FormatDateTime(CDate(FP_FieldVal(fp_rs,"from1")),
| vbLongDate)%>
|
| However I would like to do this;
|
| Wed 29 Apr 2009
|
| Can anyone help
| M
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top