Access 2002 Date Function

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

I need Access to Display the Week 1-52 function instead of
dd/mm/yy or etc....

How do I do that?

Is there a add in that I need to grab or can the current
date function do this? (Week 1 , Week 2, Week 3 etc...)
 
Either format it using Format("ww", Date()), or use the DatePart function
DatePart("ww', Date()).

Note, though, that since 52 * 7 = 364, which is less than the number of days
in a year, it's possible to have week number 53, or even 54. Look in the
help file for a couple of optional parameters you can specify in both Format
and DatePart to help control how Access decides what week is applicable.
 
I need Access to Display the Week 1-52 function instead of
dd/mm/yy or etc....

How do I do that?

Is there a add in that I need to grab or can the current
date function do this? (Week 1 , Week 2, Week 3 etc...)

There already is such a function - two of them, in fact!

If you have a Date/Time field in your Table, you can set the Format of
a textbox to

"ww"

to display the weeknumber, or to

"\Week ww"

to display Week 3; or, you can put a calculated field in a Query

Weekno: DatePart("ww", [datefield])

See the online help in the VBA editor for DatePart - the "week number"
has several options having to do with the definition of Week 1.
 
Back
Top