473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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!
Mar 19 '20 #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")

2 1691
cactusdata
214 Expert 128KB
You can use Format twice:

Expand|Select|Wrap|Line Numbers
  1. WeekNum: Format([ds_ship_date], "yyyy\/") & Format(DatePart("ww", [ds_ship_date]), "00")
Mar 20 '20 #2
Works perfectly! Thanks a ton that really helped.
Mar 20 '20 #3

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

Similar topics

4
by: Michael Haas | last post by:
Need some hwlp with comparing a date field retrieved from an access date base to the current date. Basically I'm looking to create and if statement like: If strArticleDate < = Current Date then...
49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
2
by: alfamash | last post by:
I am working on a database created by someone else. The date field in the database accept dates like 01/01/2007 but stores 1/1/2007. Please how do I format this date field to accept 01/01/2007 and...
1
by: BMF | last post by:
Howdy, I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables. Table ID --- userID -- AutoNumber UserInfo -...
3
SBCUser666
by: SBCUser666 | last post by:
This is driving me crazy. I want 1 field from the first row of a table. SELECT TOP 1 fielda FROM mytable Every row in the table will have the same value in fielda. I just want to check to...
5
by: richabf100 | last post by:
i converted an access 2003 db to 2007. it opens w/a switchboard, which then opens a form. when i switch to the table, there is no "add new field" column. the db option is set to enable design...
2
by: Steve Chapman | last post by:
Is there a way to unlink the field title from the field so they can have different lengths? When I adjust the width of either one, the other changes also. I have looked through the property sheet...
5
by: TimothyBendt | last post by:
I understand the code SELECT Brand., Company. FROM Company INNER JOIN Brand ON Company. = Brand. WHERE (((Company.)=!!)) ORDER BY Brand.; As it will only show the brand names from a...
1
by: cristosjulian | last post by:
Hi Access 2007 memo field corruption I am currently supporting a Access database. The database has a Access 2007 Front end which in saved on the desk top for multiple users and the backend...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.