Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: Getting current day from date

    Hi there,

    I have a table that generates the current date by using the default value 'day()'.
    What I need is a query that will return only the current day (e.g if today is 24/11/2003 all I want is 24).

    I can do this in excel with the 'day()' command and want to know if there is something similar in access.

    Many thanks

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    You can use:

    select day(date()) ...

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Cool ....or

    'date = 24-nov-2003

    format(now,"d") 'this wil give 24

    format(now,"d ddd") 'this wil give 24 Mon

    format(now,"d dddd") 'this wil give 24 monday

    format(now,"dddd") 'this wil give Monday

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by rnealejr
    You can use:

    select day(date()) ...
    Or

    DatePart("d", yourDate)

  5. #5
    Join Date
    Nov 2003
    Posts
    2
    Thank you all for your prompt replies, they have helped me immensely :-]

Posting Permissions

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