By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

DateName in Access

P: 10
Does anybody know of a way to display the name of a day and the year for Access?? I am trying to display the field name in ASP.

Here is the SQL:


strSql = "select AircraftSerialno + '-' + right(datename(yy,2003-12-31),1) + '-' + datename(dayofyear,2003-12-31) + '-' AS AC FROM dbo_tblAircraft WHERE aircraftid = " & request("AircraftIDfk")
Set objRS2 = objConn.Execute(strSQL)

Thanks
Sep 25 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
Hi

Are you sure that datename(yy,2003-12-31), function correctly?

Now I can't find datename function in my Access but today I think I've seen it anywhere...

Personnaly I've never used but if I need to use it I would try like this: datename("yy",CVdate("2003-12-31"))

or

datename("yy",#2003-12-31#)

:)
Sep 25 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.