473,396 Members | 1,671 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,396 software developers and data experts.

Quering data from database for the specific date period,SQL

Hi I'm trying to get data from the database from the last week of the previous month to the second last week of the current month,

I only manage to get data from the whole of the previous month to today's date.I get stuck when trying to specify weeks of the month.the month is not specified whether it ends on 31th or 30th /28 th becouse the query is going to be used for reports throughout the year.

Regards
Jan 23 '08 #1
2 1006
debasisdas
8,127 Expert 4TB
can you kindly post your query that you are using for reference of our experts.
Jan 23 '08 #2
here is my query.this is in a where clause

[(DATEDIFF(MM,tblTimeDimension_W.DateValue ,GETDATE()) <2) AND (DATEPART(DAY,tblTimeDimension_W.DateValue )>=1)
]
Jan 23 '08 #3

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

Similar topics

1
by: Yong Wang | last post by:
> Hi: > We have a database system. In the database, we have an > attribute called date0, which contains date data (format: > i. e. 2004-08-12). I wrote a script to fetch the data > in a...
0
by: jelle | last post by:
Hi, Has anyone so far been messing accessing / quering the google desktop database files? It seems it could be the best reflection of one in a couple of hundred mb, and i intent to unleash some...
2
by: Frederic Jolliton | last post by:
Hi, My problem is rather complex. I will try to explain it clearly (I hope !) Sorry for my poor english. I'm tracking change of state for entities (something than can be monitored.) The...
2
by: David Mitchell | last post by:
I have tried using the following code to count the specific number of each weekday but get a compile error "User defined type not defined" which I think relates to the first line of the function: -...
1
by: Jessica | last post by:
I have a database where a person is able to enter the different tasks they do each day by specific department and matter. On a form they enter the date, their name, and their title; in a subform...
2
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my...
5
by: turnitup | last post by:
I have found that by far the easiest way to store dates in my LAMP application is in a text string in the database in Unixtime format. First of all, what would be the most efficient data type to...
10
by: kyosohma | last post by:
Hi, I am working on a timesheet application in which I need to to find the first pay period in a month that is entirely contained in that month to calculate vacation time. Below are some example...
1
by: guyborn | last post by:
Hi I'm trying to get data from the database from the last week of the previous month to the second last week of the current month, I only manage to get data from the whole of the previous month...
0
bilibytes
by: bilibytes | last post by:
hi, I am trying to figure out what DB design to have for my application. ok lets imagine the following enterprise: TheBigBigEnterprise Inc. => TBBE TBBE is an international enterprise(with...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.