Link to home
Start Free TrialLog in
Avatar of Ritesh_Mistry
Ritesh_Mistry

asked on

Format of week column - converted from date column

Dear experts,

I have converted a date column in access to week using the following:

Week: Format([TblALC]![Date],"ww")

The problem I have is that after the conversion the returned column is a "text" column not a "number" column. this means when i compare it to tables setup already with the week number in as a "number" format i get a data type mismatch error.

Is there any way to solve this problem.

Regards

Ritesh
ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peter57r
Week: Val(Format([TblALC]![Date],"ww"))

or  
week:Datepart("ww",[TblALC]![Date])
Avatar of Ritesh_Mistry
Ritesh_Mistry

ASKER

Thanks worked great, sorry for late reply.
Glad to be of assistance.

AW