How to get day's name from date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abothra
    New Member
    • Nov 2007
    • 1

    How to get day's name from date

    Hi !!

    I have worked on this a lot but failed. I want to get days name (like Monday, Tuesday, Wednesday, etc.) from a specific date. Getting a days name from current date is simple. But how do i get days name from a specific date that is specified.

    Please help as soon as possible.

    Thanks

    Abhishek
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by abothra
    Hi !!

    I have worked on this a lot but failed. I want to get days name (like Monday, Tuesday, Wednesday, etc.) from a specific date. Getting a days name from current date is simple. But how do i get days name from a specific date that is specified.

    Please help as soon as possible.

    Thanks

    Abhishek
    the function weekday() returns a number from 1 to 7 (or is it 0 to 6? I forget) and the function weekDayName() takes a number from 1 to 7 and returns the name. To use them both together you could say: [code=asp]dim myDate
    myDate = date()
    response.write weekdayname(wee kday(myDate))[/code]

    Comment

    Working...