[thelist] SQL/MS Access Help needed-making up for bad database design

rudy r937 at interlog.com
Thu Sep 27 15:19:42 CDT 2001


><%=FormatDateTime(date,vbLongDate)%>
>
>Used with the Now() function in the place of the word 'date' in that
>example, one gets: Thursday, September 27, 2001. 

then she'll need the day of the week trimmed, right?

some more programming could handle that, i guess


janet, i think what's happening is that asp knows it's a date dataype
and is using its own default format

so you could either find the right asp function, or do a bit of
string manipulation as mentioned above...

... or you could return the string you want from msaccess

in your query, instead of

   select [ otherstuff, ] thedatefield
        from yourtable
     order by [ otherstuff, ] thedatefield

you can use the msaccess Format function

   select [ otherstuff, ] thedatefield
       , Format(thedatefield, "mmmm dd, yyyy") as datewords 
        from yourtable
     order by [ otherstuff, ] thedatefield

if you wanted the 3-letter month name, use mmm instead of mmmm

note you still want to order by thedatefield

bonus:  this solution works for all middle tiers, not just asp


rudy






More information about the thelist mailing list