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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weekdayname function prob 1

Status
Not open for further replies.

mitsiguri

Programmer
Nov 3, 2001
12
GB
Hi All,

I need help with this wee problem
This works in access 2000 query designer:

Code:
SELECT weekdayname(Duration.StartDay) as [start],weekdayname(Duration.EndDay) as [end] FROM Duration;

but when i use the same sql in asp, it gives me:

Microsoft JET Database Engine error '80040e14'

undefined function 'weekdayname' in expression

is there any way to make the weekdayname function work or maybe an alternative?

cheers
alan
 

You cannot use user-defined functions outside of Access such as in an ASP page or C++ program. Some of the VBA functions are not available. You can format the name with a Format function.

SELECT
Format(Duration.StartDay, "dddd") as [start],
Format(Duration.EndDay, "dddd") as [end]
FROM Duration;

Use "ddd" for the short (3 letter) day name. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
You can also do the traansform in the 'output' (e.g. report/form). This would actually be the more "conservative" approach, as it would relieve the db of overhead processing, and use it only to transfer INFORMATION, not do output formatting.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top