No announcements
Found 2759690 threads
-
1 Votes
Data Between the fromdate and Todate based on month and year wise...
Try select * from table where convert(datetime,cast(@year as CHAR(4))+right('0'+cast(@month as varchar(2)),2)+'01',112) ...Answered | 7 Replies | 2087 Views | Created by Hari tha - Wednesday, January 23, 2013 7:32 AM | Last reply by Hari tha - Thursday, January 24, 2013 8:49 AM -
1 Votes
Need to filter company Dropdown parameter values based on @FromDate and @ToDate Parameters
Have a look at this walkthrough: How to: Add Cascading Parameters to a Report In this case, your company dataset should contain a query like: Select Company from Companies Where ...Answered | 1 Replies | 4262 Views | Created by Natarajan V - Wednesday, August 19, 2009 6:45 AM | Last reply by Syed Mehroz Alam - Wednesday, August 19, 2009 8:52 AM -
0 Votes
Querying a cube by FromDate and ToDate
[Calendar Year].Answered | 2 Replies | 4201 Views | Created by pscorca - Thursday, December 24, 2009 8:46 AM | Last reply by pscorca - Thursday, December 24, 2009 2:34 PM -
0 Votes
How To Change Month And Year To Fromdate And Todate In Sp
any advice how to revise above SP ?Unanswered | 2 Replies | 105 Views | Created by Anonymous - Thursday, February 22, 2018 4:27 AM | Last reply by Anonymous - Tuesday, February 27, 2018 3:19 PM -
0 Votes
Build date from day,month,year column!
It definattly will cause error, maybe you have some days that are month 31 or months greater than 12.Answered | 6 Replies | 5031 Views | Created by scurenton - Wednesday, October 6, 2010 8:47 PM | Last reply by scurenton - Wednesday, October 6, 2010 9:29 PM -
0 Votes
How to make a month and year dynamic for this SP?
I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the ...Answered | 7 Replies | 1330 Views | Created by SqlDev12 - Thursday, February 7, 2013 3:22 PM | Last reply by --CELKO-- - Friday, February 8, 2013 7:44 PM -
3 Votes
To get consecutive dates in each month in a year
=@FromDate AND @StartDateAnswered | 4 Replies | 1940 Views | Created by project creator - Tuesday, October 22, 2013 4:16 AM | Last reply by Dinesh Kumar Rajendran - Tuesday, October 22, 2013 6:22 AM -
1 Votes
How to split a date range into separate years
Also, can you show me how to split it by months, weeks etc ?Answered | 6 Replies | 9219 Views | Created by Sushanth.B - Tuesday, June 7, 2011 10:41 AM | Last reply by Karthick Narayanan - Bangalore - Wednesday, October 30, 2013 5:58 AM -
0 Votes
Last month Data report
= @fromDate AND t.txnDateAnswered | 6 Replies | 876 Views | Created by ss_ssa - Monday, October 3, 2016 10:35 AM | Last reply by Sam Zha - Tuesday, October 4, 2016 7:24 AM -
2 Votes
How to get a sum of records in the last complete month
I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole ...Answered | 8 Replies | 2547 Views | Created by beanie13 - Tuesday, January 29, 2013 6:10 PM | Last reply by --CELKO-- - Wednesday, January 30, 2013 12:35 PM -
2 Votes
Get Month and Day Different
Therefore if the start date is not the first day of a month and/or the end date is not the last day of a month for two months the code will return ...Answered | 6 Replies | 823 Views | Created by Surbakti - Monday, September 26, 2016 5:06 AM | Last reply by Mr. Monkeyboy - Monday, September 26, 2016 10:34 PM -
0 Votes
First Day of Year based on given 12-month date
But what i want is Year first day should be based on (minus 12 month) i'e '01-OCT-2013' and Year End Day should be ...Answered | 9 Replies | 3536 Views | Created by balakrishna141 - Sunday, September 21, 2014 5:23 AM | Last reply by balakrishna141 - Monday, September 22, 2014 3:08 PM -
3 Votes
get all months between two dates in sql with or without data
Declare @fromDate datetime2; Declare @toDate datetime2; Set @fromDate = '2011-03-01'; Set @toDate = '2012-10-12'; With ...Answered | 21 Replies | 30381 Views | Created by Niraj Joshi - Friday, October 12, 2012 12:25 AM | Last reply by Niraj Joshi - Friday, October 12, 2012 6:50 PM -
0 Votes
how to get last year last month and Year
Try the below: Declare @str Varchar(10) = '201101' Select Cast(DatePArt(year,DATEADD(year,1,Convert(Date,@str + '01'))) as varchar(10)) + ...Answered | 5 Replies | 3139 Views | Created by prateep reddy - Tuesday, August 14, 2012 9:59 AM | Last reply by Hasham Niaz - Tuesday, August 14, 2012 2:56 PM -
2 Votes
how to execute a procedure in a select statement of another procedure
Thanks Naomi, I cant change the procedure to function.Answered | 4 Replies | 1431 Views | Created by salmanmanekia - Friday, March 22, 2013 6:25 PM | Last reply by Naomi N - Friday, March 22, 2013 7:29 PM -
0 Votes
Year and Month
=Month(Now()) =Year(Now()) I think the above expression should work for you Cheers, Jason P.S. : ...Answered | 1 Replies | 5003 Views | Created by Milli_22 - Wednesday, December 8, 2010 2:57 PM | Last reply by Jason Tom Thomas - Wednesday, December 8, 2010 3:16 PM -
1 Votes
how to find the last month and year
Hi Karen, Do you want to get last month and last year based on the parameter date?Answered | 3 Replies | 3788 Views | Created by kbran - Tuesday, December 27, 2011 11:07 PM | Last reply by PA-Singh - Wednesday, December 28, 2011 4:46 PM -
1 Votes
SQL Server - Count 1 for all active months during reporting period
= dateadd(month,datediff(month,0,FromDate),0) and Dateadd(month,n-1,FromDate)Answered | 14 Replies | 1200 Views | Created by Vicky134 - Friday, September 23, 2016 6:19 PM | Last reply by Vicky134 - Tuesday, September 27, 2016 2:09 PM -
1 Votes
Compare this years data to last years data
May this help you : DECLARE @SQL VARCHAR(8000), @Where VARCHAR(8000), @Fromdate DATETIME, @ToDate ...Answered | 2 Replies | 2418 Views | Created by SPEHE - Wednesday, January 18, 2012 10:10 AM | Last reply by SPEHE - Wednesday, January 18, 2012 12:50 PM -
0 Votes
How to add months or years in date?
adding months to column1 which is date type column DATE(YEAR(Column1),MONTH(Column1)+Column2,DAY(Column1)) Convert to your desired ...Answered | 1 Replies | 8543 Views | Created by Basweshver Jewale - Tuesday, January 11, 2011 6:19 AM | Last reply by ashutosh singh - Tuesday, January 11, 2011 6:41 AM - Items 1 to 20 of 2759690 Next ›
No announcements