Viewing 15 posts - 1 through 15 (of 49 total)
Thank you for all your Help, I did it like the below:
set @ChangedDate = (Select DATEADD(month, 1, CONVERT(datetime, @CurrentDate, 103)))
Set @ChangedDate = (SELECT DATEADD(DAY,1,EOMONTH(CONVERT(datetime,...
November 26, 2020 at 10:29 pm
Declare @CurrentDate Date = '10/12/2020';
Select Top 1 @CurrentDate,*
From (
Select Top 1 w.*, DaysDiff = DATEDIFF(dd,@CurrentDate,w.WeekDate)
From Weeks w
Where w.WeekDate >= @CurrentDate
Union All
Select Top 1 w.*, DaysDiff = DateDiff(dd, w.WeekDate, @CurrentDate)
From Weeks...
November 26, 2020 at 3:07 pm
This is my query and working fine if today date and table date in same month:
Declare @CurrentDate nvarchar (20);
Set @CurrentDate = '25/11/2020'
SELECT Top(1) ID FROM Weeks
WHERE
WeekName <> 'ALL'
AND
DATEDIFF(day, WeekDate, CONVERT(datetime,...
November 25, 2020 at 9:43 pm
You are correct date format dd/mm/yyyy
my question is :
When Today date is 25/11/2020
need to get nearest date in the below table which is (01/12/2020) (ID = 5)
if today date is...
November 25, 2020 at 9:18 pm
Thank you very much ( HappyGeek), (
January 29, 2018 at 5:36 am
I need readable date
January 29, 2018 at 12:11 am
Really i don't know where to put , i changed like that
dateadd(ss,1* (Select cast(@jsndate2 as...
January 28, 2018 at 3:16 pm
Yes i read and i know it is maximum 2,147,483,647 but the dynamic value return more than that, my question how i can solve that?
January 28, 2018 at 2:59 pm
Yes i am talking about error when value come like that " 4103049600000+0700"
the problem that this value is dynamic
i changed like the below :
declare @jsondate...
January 28, 2018 at 12:56 pm
No any order, just i need to avoided consecutive categories
July 14, 2017 at 4:26 pm
Ok, May be i need to add more details, the below is the code which have the data:
DECLARE @yourtable TABLE (id int, [name] varchar(100), category_sort varchar(100));
INSERT @yourtable...
July 14, 2017 at 3:51 pm
Viewing 15 posts - 1 through 15 (of 49 total)