James Powell
asked on
Day of Week Weekday function
Expr1: (WeekdayName([DateofImport ],True,1))
I'm trying to get this to work...based on evaluating a date field..
but I get a "Func#" error...
How can I adjust the syntax ?
I'd rather do this in a single step, instead of evaluating as a number...and then doing a secondary update query...
if I can convert the [Date of import] to a numeric field...and then get the Day of Week text...that'd be ideal.
Thanks for any guidance.
I'm trying to get this to work...based on evaluating a date field..
but I get a "Func#" error...
How can I adjust the syntax ?
I'd rather do this in a single step, instead of evaluating as a number...and then doing a secondary update query...
if I can convert the [Date of import] to a numeric field...and then get the Day of Week text...that'd be ideal.
Thanks for any guidance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this, you may need to change the position of the days, depending on your settings
choose(weekday([Date of import]), "Mon","Tue","Wed","Thu","F ri","Sat", "Sun")
choose(weekday([Date of import]), "Mon","Tue","Wed","Thu","F
I'm not sure why you are updating a table with this value. You should be calculating it whenever you need it.
This is a two step process. If you read the help entry for Weekdayname or even read what intellisense displays when you enter the expression, you will see that the first argument is a long integer. That means that it isn't a date. So first you need to find the day of the week for the particular date and only then can you convert that into a name for the weekday.
Expr1: (WeekdayName(WeekDay([Date ofImport], 1),True,1) )
Wow!!!! A lot of people posted ahead of me while I answered the phone. Dale's answer is simpler than mine since it only uses a single function.
This is a two step process. If you read the help entry for Weekdayname or even read what intellisense displays when you enter the expression, you will see that the first argument is a long integer. That means that it isn't a date. So first you need to find the day of the week for the particular date and only then can you convert that into a name for the weekday.
Expr1: (WeekdayName(WeekDay([Date
Wow!!!! A lot of people posted ahead of me while I answered the phone. Dale's answer is simpler than mine since it only uses a single function.
ASKER
Works amazing! Thank you very much for your help!
glad I could be of assistance.
Edit: Sorry, just saw the categories. The above is SQL, not Access. Not sure which you're looking for?