DateName in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BigGuy316
    New Member
    • Aug 2006
    • 10

    #1

    DateName in Access

    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 AircraftSerialn o + '-' + right(datename( yy,2003-12-31),1) + '-' + datename(dayofy ear,2003-12-31) + '-' AS AC FROM dbo_tblAircraft WHERE aircraftid = " & request("Aircra ftIDfk")
    Set objRS2 = objConn.Execute (strSQL)

    Thanks
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi

    Are you sure that datename(yy,200 3-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",C Vdate("2003-12-31"))

    or

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

    :)

    Comment

    Working...