DATEPART Function

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

I have a table with "day of week" field in it. I'm trying
to create a query that pulls records from a table using
the "day of week" field.

What criteria can i use to specify todays day. Date()
function doesn't work, cause i only need the day.

I use the DatePart function but it returns a number
representing the day. How can i get the day to return or
how can i convert the serial number or period number to
the day???
 
What are you stroing in the DayOfWeek field? A date, a number, text ("Wednesday")?

Guessing that it is the name of a day (Such as Thursday).

Field: DayofWeek
Criteria: Format(Date(),"dddd")

That will return "Monday" for today's (6/21/2004) date.

If I have misunderstood, please post back with some examples of the data you
expect to search against.
 
The field is holding text and the format option is not
working for me..

What I've done so far is:

I used the DatePart function to return todays value in the
new query field, but it returned a number, what i'm
thinking is if I can now format that number back to a text
or day of week value (i.e., Monday, Tuesday, etc.)?

And if so, can I set criteria on that field to give
me "todays" records only. So if today was Wednesday, only
Wednesday records will show?
 
You didn't answer the question.

WHAT exactly is in some of the fields? Can you type the data as it appears in
three or four of the records?

Did you try the suggestion you were given? If so, did it fail? Did you get an
error message? If so, what error message did you get?
 
Back
Top