Results 1 to 8 of 8

Thread: day

  1. #1
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224

    Unanswered: day

    how to display the day
    is there a function like date() for it

    thank you

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,422
    Provided Answers: 7
    Try

    Format([Feildname],"DDDD") => Monday

    Format([Feildname],"DDD") => Mon
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Do you mean day of the week or day of the month?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    day of the week

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Myles got you covered then.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    i need a function to put in the default field

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Uh....

    Format(date(),"DDDD") ?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    In a query you can create two fields. There is probably someone here who can do it off one field but if not the following works.

    In the follow example, which I have copied from my data base the date is in a field called [Days]

    The first calculated field that is made in the query is

    WDay: Weekday([Days])

    The created field WDay returns a number. It is 1 for Sunday through to 7 for Saturday.

    The next field that is created returns the words such as Sunday, Wednesday etc

    DayName: IIf([Wday] Like 1,"Sunday",IIf([WDay] Like 2,"Monday",IIf([Wday] Like 3,"Tuesday",IIf([WDay] Like 4,"Wednesday",IIf([WDay] Like 5,"Thursday",IIf([WDay] Like 6,"Friday",IIf([WDay] Like 7,"Saturday")))))))

    So when you look at the query that is opened you see

    Days............Wday.............DayName

    7/05/2004.....6..................Friday

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •