Viewing 15 posts - 1 through 15 (of 17 total)
I got your point on omitting the offset field. Based on the week day, we can populate date and concatenate with time field. Thank you for clearing this out.
March 2, 2021 at 5:22 pm
The date expected is always less than current date. For your queries, here is my reply.
At Time Zone is not available in 2012
In the example - the expected return is...
March 2, 2021 at 3:58 am
This works perfectly. A little change in the output. If I pass TestDate as Today. It has to get me Thursday (follows with 2nd Tue - 12 Nov 2020) of...
December 1, 2020 at 6:34 am
fnTally function is not available. Can you help me? - I'm intended to get Thursday of a month which is followed with 2nd Tuesday
November 30, 2020 at 3:20 pm
I have 2012 version. How do I accomplish the offset value based on day light savings.
May 15, 2020 at 5:16 am
DECLARE @Texxt Varchar(50);
SET @Texxt = 'Wed, 15 Apr 2020 02:00:00 -0400';
SELECT @Texxt as original,
SUBSTRING(STUFF(@Texxt,1,5,''),1,DATALENGTH(STUFF(@Texxt,1,5,''))-5) convertedone
Done!!!
April 15, 2020 at 11:04 am
14 Apr 2020 23:00:01 +0000
15 Apr 2020 03:58:49 -0400
15 Apr 2020 02:00:00 -0400
15 Apr 2020 03:00:04 -0400
14 Apr 2020 12:00:00 -0400
I used the stuff to replace the first 4 char...
April 15, 2020 at 10:19 am
I didn't do that. How will I do that?
April 15, 2020 at 9:00 am
I'm using 2012.
SELECT SYSDATETIMEOFFSET() AT TIME ZONE 'India Standard Time' AS [FullISTDateTime],
convert(time, SYSDATETIMEOFFSET() AT TIME ZONE 'India Standard Time') AS [ISTCurrentTime];
This returns incorrect syntax near 'TIME'
February 21, 2020 at 4:08 am
Issue Resolved
DECLARE @Hostnames VARCHAR(max)
Select @Hostnames = concat('''', stuff((select ', ' + ServerName from #serverinput for xml path ('')), 1, 2, ''), '''');
select @Hostnames
February 18, 2020 at 9:00 am
Invalid object name 'server_cte'
February 18, 2020 at 5:37 am
how do i set this to a local varabile in sql server
I used this, it doesnt work.
Declare @localvariable varchar(max)
;with
server_cte(ServerName) as (select 'Server1' union all select 'Server2')
select
concat('''', stuff((select ', ' +...
February 18, 2020 at 4:43 am
It doesnt work.
The o/p should be like this
'Server1,server2,server3'
The current result is
Server1, server2, server3
February 17, 2020 at 7:59 am
The Above sample one works fine as it is. When I include it in my SP. It throws the below error.
The conversion of a nvarchar data type to a datetime...
December 17, 2019 at 4:55 pm
Any suggestion
December 13, 2019 at 7:10 am
Viewing 15 posts - 1 through 15 (of 17 total)