By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 1,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

Sorting formatted date field "YYYY/'WW" in a cross tab - access 2007

P: 2
Hi - I'm trying to create a crosstab using week number and year - WeekNum: Format([ds_ship_date],"yyyy/ww"), everything appears to work but in the cross tab it sorts as 2020/1, 2020/10,2020/2..

Please help how I can make it work!
1 Week Ago #1

✓ answered by cactusdata

You can use Format twice:

Expand|Select|Wrap|Line Numbers
  1. WeekNum: Format([ds_ship_date], "yyyy\/") & Format(DatePart("ww", [ds_ship_date]), "00")

Share this Question
Share on Google+
2 Replies


cactusdata
P: 79
You can use Format twice:

Expand|Select|Wrap|Line Numbers
  1. WeekNum: Format([ds_ship_date], "yyyy\/") & Format(DatePart("ww", [ds_ship_date]), "00")
1 Week Ago #2

P: 2
Works perfectly! Thanks a ton that really helped.
1 Week Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.