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

Start Date, end date dynamic parameter

I've been asked to edit a script. Several of the select statements have date parameters in the where clause. I'm trying to write a simple @Start_date and @End_Date. The fields are DATETIME. I need to get the first of the month in MMYYYY format for the @Start_Date and the last of the month in the same format for @End_Date. I'm new to sql server.
SO far
DECLARE @Start_Date DATETIME
SET (How to pass first date of the entered MMYYYY?)

ditto for @end date

Thanks!
Dec 8 '16 #1
0 1516

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

Similar topics

16
by: sandy | last post by:
Hi, Using Java script I am trying to create code where when you place in the start date it automatically calculates 6 months for the experations date. For example when I place 01/01/04 as the...
2
by: systemutvecklare | last post by:
Hi! I have an application that generates an html-form from an xml-file using an xsl-file. My problem is that I want the xsl to use some "unknown" parameters that I pass to the xslt processor...
3
by: David Kuhn | last post by:
I have a query with a date field criteria of: Between And When the query is run, I am asked for the Start date and then the End Date. So far, so good. The records returned are all those in...
7
by: CheezIt2831 | last post by:
hello, I have 5 tables(Alpha, Bravo, Charlie, Service, Trans). What i am trying to do is be able to select a start date and ending date for a report and include fields from the 5 tables. this is my...
0
by: Scott | last post by:
I have a report that summarizes attendance occurances for my team of 50 employees. Right now the date values are entered by the user before report execution. I want the start date to be...
1
by: Del | last post by:
I have a parameter query that requires the user to enter a Start Date: and End Date: and pull data between that date range. I am currently using the following parameter; Select * From mytable...
0
by: Martin Ruprecht | last post by:
Hi, I do have a big problem: We are creating a reporting tool for logistic solutions using Crystal Reports. I actually am programming a history report. There are millions of lines in the...
3
by: Jared Elyea | last post by:
I had no experience in VB before writing this so bare with me... the function below seems to work for certain cases, but not all (in some cases it is a week behind). Can anybody help me figure this...
1
by: divya birla | last post by:
Posted - 03/29/2011 : 06:34:20 I have a table which contain Topic, Sequence number and no of turns. User input the Single Start date and on the basis of which series of start date and end...
2
by: eastbat | last post by:
Hi Everyone, I would like to create an from the in ms access form. The formula is simple :( + 3month) - (day of the start date-1day) for example: a.) if the start date is 01.01.2011 than the...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.