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
Ritesh_MistryAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Arthur_WoodConnect With a Mentor Commented:
Week: cInt(Format([TblALC]![Date],"ww"))

converts the value to an Integer

AW
0
 
peter57rCommented:
Week: Val(Format([TblALC]![Date],"ww"))

or  
week:Datepart("ww",[TblALC]![Date])
0
 
Ritesh_MistryAuthor Commented:
Thanks worked great, sorry for late reply.
0
 
Arthur_WoodCommented:
Glad to be of assistance.

AW
0
All Courses

From novice to tech pro — start learning today.