473,326 Members | 2,111 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,326 software developers and data experts.

DatePart week problem

I use DatePart("ww",[Time Transaction Table].Date) to get the number of the week in the year for a weekly time card.

The week in the system is beginning Sunday and ending Saturday. Is there any way to make it beginning Monday and ending Sunday?
Dec 12 '06 #1
3 5364
MMcCarthy
14,534 Expert Mod 8TB
I use DatePart("ww",[Time Transaction Table].Date) to get the number of the week in the year for a weekly time card.

The week in the system is beginning Sunday and ending Saturday. Is there any way to make it beginning Monday and ending Sunday?
The syntax for this function is ...

Expand|Select|Wrap|Line Numbers
  1. DatePart ( interval, date, [firstdayofweek], [firstweekofyear])
  2.  
The default is 1 for Sunday and 2 would be Monday.

Therefore .....

Expand|Select|Wrap|Line Numbers
  1. DatePart ("ww",[Time Transaction Table].[Date], 2)
  2.  
Mary
Dec 12 '06 #2
I have to tell you, this has been the biggest Access project I've ever done, and to have something come up when I'm this far into it (like the first day of the week issue) that can potentially mess up all of my work is very scary to a non-pro like me.

This was an easy fix, and it worked great. Thank you so much...you have saved my skin!

ang

The syntax for this function is ...

Expand|Select|Wrap|Line Numbers
  1. DatePart ( interval, date, [firstdayofweek], [firstweekofyear])
  2.  
The default is 1 for Sunday and 2 would be Monday.

Therefore .....

Expand|Select|Wrap|Line Numbers
  1. DatePart ("ww",[Time Transaction Table].[Date], 2)
  2.  
Mary
Dec 12 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
I have to tell you, this has been the biggest Access project I've ever done, and to have something come up when I'm this far into it (like the first day of the week issue) that can potentially mess up all of my work is very scary to a non-pro like me.

This was an easy fix, and it worked great. Thank you so much...you have saved my skin!

ang
You're welcome ang.

Mary
Dec 12 '06 #4

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

Similar topics

3
by: David | last post by:
Hi Group, i am trying to use the DatePart function on my SQL2000 database. I have a table called visitors with a field called DateTimeEntrance which is filled everytime a visitor enters the site....
3
by: Chumley the Walrus | last post by:
I'm trying to use DatePart and Datediff functions to show the formatted m/dd/yyyy display for the dates of Monday and Friday of the current week. I want it to display as: Our Weekly Schedule...
2
by: Aaran76 | last post by:
I am creating a booking system in ASP.Net with VB and a MSSQL backend. I am having problems knowing where to begin with a particular part of the system. Bookings can only be made in weekly...
3
by: S. van Beek | last post by:
Dear reader, With DatePart() you can subtract the year or the week from a date field with: DatePart("yyyy";) for the year
9
by: Cliff | last post by:
I want to use the Datepart function to determine the week number based on my company's fiscal calendar which starts Nov. 1. I have tried the following and they all produce #ERROR# . ...
7
by: tasmontique | last post by:
I have an access table that outputs to excel using a query . However what I am trying to do is under the arrival date column specify a criteria based on the Datepart function that only displays...
10
by: Mika M | last post by:
Hi! I'm converting some methods of VB-class into C#-class for another project. It's quite easy, but when converting method which returns last week number of the entered year I got problems. The...
3
by: devagupt | last post by:
Hello , I have a query which adds all the downtime for a given week and displays it. All i have to do is , is to type the week number and it shows be the data. However we have rolled into the new...
1
by: Spoogledrummer | last post by:
Hi, I've run across a problem with on one of the applications I work on. A report uses the group by datepart (wk,Date) but as this is 2007 it messes up as it sees there being 53 weeks so breaks a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.