Working with Calendar Days

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a days table where each calander day is represented from 1 - 7 (where
1=sun, 2=mon, 3=tues, 4=wed, 5=thu, 6=fri, 7=sat)

I need to do the following in SQL:

1) work out the current day (today's calander day)
2) convert current day to a number
3) extract any records stored that represent the current day

Thanks,
GLT
 
Today's date is:
Date()

To get the week-day number:
Weekday(Date())

If you have a field containing a value between 1 to 7, and you want to
select the records that match today's date, just put that last expression
into the Criteria row under this field.
 
Back
Top