Change the resulting data format in a field

A

Adrian

I want to display the current field result from 'ww' (week in the year) to
numeric 00, so i can sort the results from week 01 to 52 currently Access
sorts 'ww' formats as follows ...17 18 19 2 20 21...28 29 3 30 31... and this
is no good
 
D

Dan Artuso

Hi,
Sorry, I should have explained that CInt() will convert the value
to an integer so that the sorting will be as you want it.
 
J

John Spencer (MVP)

If you are using the FORMAT function to get the week number it will return a
string value. You can try using the DatePart function, which will return a
number and which should sort in the order you wish.

DatePart("ww",SomeDateValue)
 
Top