Table with dates and dayname

samirshah172

Registered User.
Local time
Today, 10:55
Joined
Apr 18, 2015
Messages
16
Hello,

I am very new with access database. Want to create table with Dates & DayName. For example, tblYear2015 with all dates from 1-Jan-2015 to 31-Dec-2015 in FirstColumn and DayName in second column as per date of First Column. DayName Should be entered automatically as per date entered in first column.

Please help.

Regards
Samir Shah.
 
What is the purpose of this table?

Whatever it is you would not store the day name because it can be returned from any date using built in functions of Access.
 
Ok got it, can you help me to populate DayName in report.

Thanks for the help.
 
This will return the full day name:
Code:
= Format([datefield],"dddd")

If you want it abbreviated:
Code:
= Format([datefield],"ddd")
 
note also that the day is also represented as a number in the range 1 to 7, sunday being 1, and this number for a given date can be obtained by

weekday(mydate)

there are vb constants so you can use constructs like this

if weekday(mydate) = vbsaturday then ...
 

Users who are viewing this thread

Back
Top Bottom