Thanks George. This is brilliant. Works great. I am tidying up my statements and will let you know if i need any help from you.
I just made one change to your statement
dateadd(minute,-1,DateAdd(day, DateDiff(day, 0, Start), 1))
substracted 1 min to get the datetime as
18/07/2005 23:59:00
Thanks George, I am out of my mind. Here is the modified sample data.
id start end Duration
1 18/07/2005 18:00:00 19/07/2005 04:30:00 10.5
2 18/07/2005 09:00:00 18/07/2005 17:30:00 8.5
should be displayed as
id start...
Hi guys
How can i display a date which straddles at midnight, as two seperate dates
here is my data
id start end Duration
1 18/07/2005 18:00:00 19/07/2005 04:30:00 10.30
2 18/07/2005 09:00:00 18/07/2005 17:30:00 8.30
should be displayed as
id start end...
You can call this function like this
@List - this is the string to parse
@SplitOn - this is a Delimiter in this case it is ','
Select Value from Split(@List,',')
try this
CREATE FUNCTION dbo.Split2
(
@List nvarchar(2000),
@SplitOn nvarchar(5)
)
RETURNS @RtnValue table
(
Id int identity(1,1),
Value nvarchar(100)
)
AS
BEGIN
if @String is not null
begin
While (Charindex(@SplitOn,@List)>0)
Begin
Insert Into @RtnValue (value)
Select
Value =...
Hi George
This will work perfectly, if we wanted to display the local time based on local timezone
But my Main problem is
i know how to calculate a daylight saving time based on the local time but how do we calculate the daylight saving time for a perticular timezone
I think i should have...
Hi George
I am storing the Timezone info in the database along side each user.
As we know what Timezone the user wants to be in , so the information of the offset
But this offset changes when the Daylight saving time changes.
so problem is how do we determine the offset taking into...
Hi George
You are right it will give you the UTC offset, but my problem is, this shouldn't be client specific , but instead it should take the Timezone settings against the user in the table.
If you use GetUTCDate() - GetDate() - it will give different offsets for different timezones. In...
Borislav,
I think the solution you have pointed to me is discussing about Time Conversion on .Net. It is also reading the TimeZone information from the registry.
I am looking for a solution using sql server
(I hope any expert might have written a function or stored procedure to translate UTC...
Thanks Borislav,
But unfortunately this won't help me in my case, as the same user might travel to different timezones but he expect the data to be viewed in his choosen timezone.
Hello
Is there any function in sql server which converts the dates(UTC) to locat time.
problem:
I have let say 20 users and each work in different timezones and each user should be able to see their data in their timezone and the rest will be in their respective timezones.
i don't know what...
Hi guys,
i am trying to run my web application(ASP) from with in Outlook.I use Session vartiables to hold some information.
The problem is when i open a new window from with in my application it it creating new SessionId even though i am in a same session.
Any help is greatly appreciated.I...
Thanks Dan, so it seems we don't have any easy alternative for the disabled(IE) attribute.
The solution you have suggested should work without any doubt and indeed i am doing that, but we need to do the cosmetics to get the disabled look so what i am thinking is to change the color(#ACA899) of...
Dan, i am sure this will work but i'm looking for any other better solution we have as i need to use this solution in many places..
any other ideas as we have a nice attribute in IE(disabled) so some thing for firefox please..
Hi all,
Can some one please have a look at it and guide me what's wrong with this anchor tag.It works fine in IE but not in firefox..
<a class="Item" href="" Onclick="javascript:return false;" style="width:100" disabled>Contents</a>
Thanks
Hi all,
I don't know how simple this could be..but this is taking on me for quite a some time.It just works fine in IE but not in firefox..Could some please guide me what's wrong in here..
<a class="Item" href="" Onclick="javascript:return false;" style="width:100" disabled>Contents</a>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.