UTC or GMT to Australia Local DateTime Conversion (Melbourne, Victoria)

Hi Guys,
I have to convert UTC or GMT DateTime to Australia Local DateTime Conversion (Melbourne, Victoria) and we need to consider Daylight Saving which starts every Year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours
from Daylight Saving Start Date to Daylight Saving End Date which finishes on 1st Sunday of April Month every Year.
Other that Daylight Saving Time Difference between UTC and VIC loacal time is 10 Hours. So Non Daylight Starts on
1st Sunday of April Month every Year and ends on October first Sunday every Year.
Note: On first Sunday of October Month at 2 AM, Our System Time moves 1 hour ahead so It displays 3 AM. Our Wrist Watch, you adjust manually and we make 1 hour ahead. So Technically Time between 2 AM to 2:59:59:599 does not exists in
Melbourne and 2 AM means 3 AM and 2:10 AM means 3:10 AM Etc
http://www.timeanddate.com/worldclock/converter.html
http://www.business.vic.gov.au/operating-a-business/how-to-start/trading-hours/daylight-saving
http://www.world-time.com.au/index.php?option=com_content&view=article&id=12&Itemid=4
Thanks Shiven:) If Answer is Helpful, Please Vote

Hi Guys,
To convert data from UTC to Local, I used Custom table and I defined 4 columns DAYLIGHT_START_DT, DAYLIGHT_END_DT, AEST_START_DT and AEST_END_DT.
and Wrote below function to get conversion.
--Function to Convert UTC to Local
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Function [dbo].[UTCtoCurrentTime]
       @date datetime
Returns datetime
As 
Begin
Declare @OUTPUT datetime
SET @OUTPUT=
SELECT 
       CASE WHEN @date BETWEEN [DAYLIGHT_START_DT_UTC] AND [DAYLIGHT_END_DT_UTC] 
            THEN DATEADD(hh,[HOURS_DIFF_DURING_DAYLIGHT],@date)
WHEN @date>[DAYLIGHT_END_DT_UTC] AND @date<=[AEST_END_DT_UTC] 
THEN DATEADD(hh,[HOURS_DIFF_DURING_AEST],@date)
END 
FROM [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE]
WHERE [AEST_END_DT] IS NOT NULL 
AND ((@date BETWEEN [DAYLIGHT_START_DT_UTC] AND [DAYLIGHT_END_DT_UTC]) OR (@date>[DAYLIGHT_END_DT_UTC] AND @date<=[AEST_END_DT_UTC] ))
Return @OUTPUT
End
GO
--Function to Convert Local to UTC
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Function [dbo].[CurrentTimeToUTC]
       @date datetime
Returns datetime
As 
Begin
Declare @OUTPUT datetime
SET @OUTPUT=
SELECT 
       CASE WHEN @date BETWEEN [DAYLIGHT_START_DT_LOCAL] AND [DAYLIGHT_END_DT_LOCAL] 
            THEN DATEADD(hh,-1*[HOURS_DIFF_DURING_DAYLIGHT],@date)
WHEN @date>[DAYLIGHT_END_DT_LOCAL] AND @date<=[AEST_END_DT_LOCAL] 
THEN DATEADD(hh,-1*[HOURS_DIFF_DURING_AEST],@date)
END 
FROM [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE]
WHERE [AEST_END_DT] IS NOT NULL 
AND ((@date BETWEEN [DAYLIGHT_START_DT_LOCAL] AND [DAYLIGHT_END_DT_LOCAL]) OR (@date>[DAYLIGHT_END_DT_LOCAL] AND @date<=[AEST_END_DT_LOCAL] ))
Return @OUTPUT
End
GO
But I made a mistake When Storing data into my Table [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE]. As I have to Convert from UTC to Local So I have to Store data into UCT format but I stored into Local DateTime format and then I was getting wrong output
for boundaries values.
But once I realized, I changed the Table Structure and added column for UTC and LOCAL both
DAYLIGHT_START_DT_UTC, DAYLIGHT_START_DT_LOCAL, DAYLIGHT_END_DT_UTC, DAYLIGHT_END_DT_LOCAL, AEST_START_DT_UTC, AEST_START_DT_LOCAL, AEST_END_DT_UTC & AEST_END_DT_LOCAL
and then above Functions were working perfectly.
Here is complete data and Table Structure:
SET
ANSI_NULLS ON
GO
SET
QUOTED_IDENTIFIER ON
GO
SET
ANSI_PADDING ON
GO
CREATE
TABLE
[DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE](
[YEAR] [int]
NOT NULL,
[DAYLIGHT_START_DAY] [varchar](15)
NOT NULL,
[DAYLIGHT_START_DT_UTC]
[datetime] NOT NULL,
[DAYLIGHT_START_DT_LOCAL]
[datetime] NOT NULL,
[DAYLIGHT_END_DT_UTC] [datetime]
NOT NULL,
[DAYLIGHT_END_DT_LOCAL]
[datetime] NOT NULL,
[HOURS_DIFF_DURING_DAYLIGHT]
[tinyint] NOT NULL,
[AEST_START_DT_UTC] [datetime]
NULL,
       [AEST_START_DT_LOCAL]
[datetime] NULL,
[AEST_END_DT_UTC] [datetime]
NULL,
[AEST_END_DT_LOCAL] [datetime]
NULL,
[HOURS_DIFF_DURING_AEST]
[tinyint] NULL,
[REC_UPDT_USER] [varchar](30)
NOT NULL,
[REC_LOAD_DT] [datetime]
NOT NULL,
[COMMENTS] [varchar](200)
NULL
ON [PRIMARY]
GO
SET
ANSI_PADDING OFF
GO
ALTER
TABLE
[DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE]
ADD  DEFAULT
(getdate())
FOR [REC_LOAD_DT]
GO
YEAR
DAYLIGHT_START_DAY
DAYLIGHT_START_DT_UTC
DAYLIGHT_START_DT_LOCAL
DAYLIGHT_END_DT_UTC
DAYLIGHT_END_DT_LOCAL
HOURS_DIFF_DURING_DAYLIGHT
AEST_START_DT_UTC
AEST_START_DT_LOCAL
AEST_END_DT_UTC
AEST_END_DT_LOCAL
HOURS_DIFF_DURING_AEST
REC_UPDT_USER
REC_LOAD_DT
COMMENTS
2005
Sunday
2005-29-10 16:00:00
2005-30-10 2:00:00
2006-01-04 17:00:00
2006-02-04 3:00:00
11
2006-01-04 17:00:01
2006-02-04 3:00:01
2006-30-09 15:59:59
2006-01-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:51:23
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2006
Sunday
2006-30-09 16:00:00
2006-01-10 2:00:00
2007-31-03 17:00:00
2007-01-04 3:00:00
11
2007-31-03 17:00:01
2007-01-04 3:00:01
2007-06-10 15:59:59
2007-07-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:46:48
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2007
Sunday
2007-06-10 16:00:00
2007-07-10 2:00:00
2008-05-04 17:00:00
2008-06-04 3:00:00
11
2008-05-04 17:00:01
2008-06-04 3:00:01
2008-04-10 15:59:59
2008-05-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:46:06
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2008
Sunday
2008-04-10 16:00:00
2008-05-10 2:00:00
2009-04-04 17:00:00
2009-05-04 3:00:00
11
2009-04-04 17:00:01
2009-05-04 3:00:01
2009-03-10 15:59:59
2009-04-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:44:47
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2009
Sunday
2009-03-10 16:00:00
2009-04-10 2:00:00
2010-03-04 17:00:00
2010-04-04 3:00:00
11
2010-03-04 17:00:01
2010-04-04 3:00:01
2010-02-10 15:59:59
2010-03-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:41:48
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2010
Sunday
2010-02-10 16:00:00
2010-03-10 2:00:00
2011-02-04 17:00:00
2011-03-04 3:00:00
11
2011-02-04 17:00:01
2011-03-04 3:00:01
2011-01-10 15:59:59
2011-02-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:34:16
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2011
Sunday
2011-01-10 16:00:00
2011-02-10 2:00:00
2012-31-03 17:00:00
2012-01-04 3:00:00
11
2012-31-03 17:00:01
2012-01-04 3:00:01
2012-06-10 15:59:59
2012-07-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:35:39
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2012
Sunday
2012-06-10 16:00:00
2012-07-10 2:00:00
2013-06-04 17:00:00
2013-07-04 3:00:00
11
2013-06-04 17:00:01
2013-07-04 3:00:01
2013-05-10 15:59:59
2013-06-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:36:22
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2013
Sunday
2013-05-10 16:00:00
2013-06-10 2:00:00
2014-05-04 17:00:00
2014-06-04 3:00:00
11
2014-05-04 17:00:01
2014-06-04 3:00:01
2014-04-10 15:59:59
2014-05-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:37:31
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2014
Sunday
2014-04-10 16:00:00
2014-05-10 2:00:00
2015-04-04 17:00:00
2015-05-04 3:00:00
11
2015-04-04 17:00:01
2015-05-04 3:00:01
2015-03-10 15:59:59
2015-04-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:39:08
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2015
Sunday
2015-03-10 16:00:00
2015-04-10 2:00:00
2016-02-04 17:00:00
2016-03-04 3:00:00
11
2016-02-04 17:00:01
2016-03-04 3:00:01
2016-01-10 15:59:59
2016-02-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:44:31
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2016
Sunday
2016-01-10 16:00:00
2016-02-10 2:00:00
2017-01-04 17:00:00
2017-02-04 3:00:00
11
2017-01-04 17:00:01
2017-02-04 3:00:01
2017-30-09 15:59:59
2017-01-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:44:57
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2017
Sunday
2017-30-09 16:00:00
2017-01-10 2:00:00
2018-31-03 17:00:00
2018-01-04 3:00:00
11
2018-31-03 17:00:01
2018-01-04 3:00:01
2018-06-10 15:59:59
2018-07-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:48:12
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2018
Sunday
2018-06-10 16:00:00
2018-07-10 2:00:00
2019-06-04 17:00:00
2019-07-04 3:00:00
11
2019-06-04 17:00:01
2019-07-04 3:00:01
2019-05-10 15:59:59
2019-06-10 1:59:59
10
ABC\shivendoo.kumar
2013-18-11 16:48:44
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2019
Sunday
2019-05-10 16:00:00
2019-06-10 2:00:00
2020-04-04 17:00:00
2020-05-04 3:00:00
11
2020-04-04 17:00:01
2020-05-04 3:00:01
2020-03-10 15:59:59
2020-04-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:55:54
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2020
Sunday
2020-03-10 16:00:00
2020-04-10 2:00:00
2021-03-04 17:00:00
2021-04-04 3:00:00
11
2021-03-04 17:00:01
2021-04-04 3:00:01
2021-02-10 15:59:59
2021-03-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:56:48
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2021
Sunday
2021-02-10 16:00:00
2021-03-10 2:00:00
2022-02-04 17:00:00
2022-03-04 3:00:00
11
2022-02-04 17:00:01
2022-03-04 3:00:01
2022-01-10 15:59:59
2022-02-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:58:01
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2022
Sunday
2022-01-10 16:00:00
2022-02-10 2:00:00
2023-01-04 17:00:00
2023-02-04 3:00:00
11
2023-01-04 17:00:01
2023-02-04 3:00:01
2023-30-09 15:59:59
2023-01-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 16:59:55
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2023
Sunday
2023-30-09 16:00:00
2023-01-10 2:00:00
2024-06-04 17:00:00
2024-07-04 3:00:00
11
2024-06-04 17:00:01
2024-07-04 3:00:01
2024-05-10 15:59:59
2024-06-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 17:00:30
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
2024
Sunday
2024-05-10 16:00:00
2024-06-10 2:00:00
2025-05-04 17:00:00
2025-06-04 3:00:00
11
2025-05-04 17:00:01
2025-06-04 3:00:01
2025-04-10 15:59:59
2025-05-10 1:59:59
10
ABC\shivendoo.kumar
2014-14-02 17:02:06
Day light saving starts each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2010, N'Sunday', CAST(0x00009E030107AC00 AS DateTime), CAST(0x00009E040020F580 AS DateTime), CAST(0x00009EB9011826C0 AS DateTime), CAST(0x00009EBA00317040 AS
DateTime), 11, CAST(0x00009EB9011827EC AS DateTime), CAST(0x00009EBA0031716C AS DateTime), CAST(0x00009F6F0107AAD4 AS DateTime), CAST(0x00009F700020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0111154E AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2011, N'Sunday', CAST(0x00009F6F0107AC00 AS DateTime), CAST(0x00009F700020F580 AS DateTime), CAST(0x0000A025011826C0 AS DateTime), CAST(0x0000A02600317040 AS
DateTime), 11, CAST(0x0000A025011827EC AS DateTime), CAST(0x0000A0260031716C AS DateTime), CAST(0x0000A0E20107AAD4 AS DateTime), CAST(0x0000A0E30020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A01117620 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2012, N'Sunday', CAST(0x0000A0E20107AC00 AS DateTime), CAST(0x0000A0E30020F580 AS DateTime), CAST(0x0000A198011826C0 AS DateTime), CAST(0x0000A19900317040 AS
DateTime), 11, CAST(0x0000A198011827EC AS DateTime), CAST(0x0000A1990031716C AS DateTime), CAST(0x0000A24E0107AAD4 AS DateTime), CAST(0x0000A24F0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0111A8A7 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2013, N'Sunday', CAST(0x0000A24E0107AC00 AS DateTime), CAST(0x0000A24F0020F580 AS DateTime), CAST(0x0000A304011826C0 AS DateTime), CAST(0x0000A30500317040 AS
DateTime), 11, CAST(0x0000A304011827EC AS DateTime), CAST(0x0000A3050031716C AS DateTime), CAST(0x0000A3BA0107AAD4 AS DateTime), CAST(0x0000A3BB0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0111FA72 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2014, N'Sunday', CAST(0x0000A3BA0107AC00 AS DateTime), CAST(0x0000A3BB0020F580 AS DateTime), CAST(0x0000A470011826C0 AS DateTime), CAST(0x0000A47100317040 AS
DateTime), 11, CAST(0x0000A470011827EC AS DateTime), CAST(0x0000A4710031716C AS DateTime), CAST(0x0000A5260107AAD4 AS DateTime), CAST(0x0000A5270020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A01126BB7 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2015, N'Sunday', CAST(0x0000A5260107AC00 AS DateTime), CAST(0x0000A5270020F580 AS DateTime), CAST(0x0000A5DC011826C0 AS DateTime), CAST(0x0000A5DD00317040 AS
DateTime), 11, CAST(0x0000A5DC011827EC AS DateTime), CAST(0x0000A5DD0031716C AS DateTime), CAST(0x0000A6920107AAD4 AS DateTime), CAST(0x0000A6930020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0113E61E AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2016, N'Sunday', CAST(0x0000A6920107AC00 AS DateTime), CAST(0x0000A6930020F580 AS DateTime), CAST(0x0000A748011826C0 AS DateTime), CAST(0x0000A74900317040 AS
DateTime), 11, CAST(0x0000A748011827EC AS DateTime), CAST(0x0000A7490031716C AS DateTime), CAST(0x0000A7FE0107AAD4 AS DateTime), CAST(0x0000A7FF0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0114042C AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2017, N'Sunday', CAST(0x0000A7FE0107AC00 AS DateTime), CAST(0x0000A7FF0020F580 AS DateTime), CAST(0x0000A8B4011826C0 AS DateTime), CAST(0x0000A8B500317040 AS
DateTime), 11, CAST(0x0000A8B4011827EC AS DateTime), CAST(0x0000A8B50031716C AS DateTime), CAST(0x0000A9710107AAD4 AS DateTime), CAST(0x0000A9720020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A0114E983 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2018, N'Sunday', CAST(0x0000A9710107AC00 AS DateTime), CAST(0x0000A9720020F580 AS DateTime), CAST(0x0000AA27011826C0 AS DateTime), CAST(0x0000AA2800317040 AS
DateTime), 11, CAST(0x0000AA27011827EC AS DateTime), CAST(0x0000AA280031716C AS DateTime), CAST(0x0000AADD0107AAD4 AS DateTime), CAST(0x0000AADE0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A27A01150E75 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2009, N'Sunday', CAST(0x00009C970107AC00 AS DateTime), CAST(0x00009C980020F580 AS DateTime), CAST(0x00009D4D011826C0 AS DateTime), CAST(0x00009D4E00317040 AS
DateTime), 11, CAST(0x00009D4D011827EC AS DateTime), CAST(0x00009D4E0031716C AS DateTime), CAST(0x00009E030107AAD4 AS DateTime), CAST(0x00009E040020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D20113268C AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2008, N'Sunday', CAST(0x00009B2B0107AC00 AS DateTime), CAST(0x00009B2C0020F580 AS DateTime), CAST(0x00009BE1011826C0 AS DateTime), CAST(0x00009BE200317040 AS
DateTime), 11, CAST(0x00009BE1011827EC AS DateTime), CAST(0x00009BE20031716C AS DateTime), CAST(0x00009C970107AAD4 AS DateTime), CAST(0x00009C980020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D20113F95D AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2007, N'Sunday', CAST(0x000099BF0107AC00 AS DateTime), CAST(0x000099C00020F580 AS DateTime), CAST(0x00009A75011826C0 AS DateTime), CAST(0x00009A7600317040 AS
DateTime), 11, CAST(0x00009A75011827EC AS DateTime), CAST(0x00009A760031716C AS DateTime), CAST(0x00009B2B0107AAD4 AS DateTime), CAST(0x00009B2C0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D201145531 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2006, N'Sunday', CAST(0x0000984C0107AC00 AS DateTime), CAST(0x0000984D0020F580 AS DateTime), CAST(0x00009902011826C0 AS DateTime), CAST(0x0000990300317040 AS
DateTime), 11, CAST(0x00009902011827EC AS DateTime), CAST(0x000099030031716C AS DateTime), CAST(0x000099BF0107AAD4 AS DateTime), CAST(0x000099C00020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D201148683 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2005, N'Sunday', CAST(0x000096FC0107AC00 AS DateTime), CAST(0x000096FD0020F580 AS DateTime), CAST(0x00009796011826C0 AS DateTime), CAST(0x0000979700317040 AS
DateTime), 11, CAST(0x00009796011827EC AS DateTime), CAST(0x000097970031716C AS DateTime), CAST(0x0000984C0107AAD4 AS DateTime), CAST(0x0000984D0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D20115C908 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2019, N'Sunday', CAST(0x0000AADD0107AC00 AS DateTime), CAST(0x0000AADE0020F580 AS DateTime), CAST(0x0000AB93011826C0 AS DateTime), CAST(0x0000AB9400317040 AS
DateTime), 11, CAST(0x0000AB93011827EC AS DateTime), CAST(0x0000AB940031716C AS DateTime), CAST(0x0000AC490107AAD4 AS DateTime), CAST(0x0000AC4A0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D2011706AB AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2020, N'Sunday', CAST(0x0000AC490107AC00 AS DateTime), CAST(0x0000AC4A0020F580 AS DateTime), CAST(0x0000ACFF011826C0 AS DateTime), CAST(0x0000AD0000317040 AS
DateTime), 11, CAST(0x0000ACFF011827EC AS DateTime), CAST(0x0000AD000031716C AS DateTime), CAST(0x0000ADB50107AAD4 AS DateTime), CAST(0x0000ADB60020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D2011745D9 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2021, N'Sunday', CAST(0x0000ADB50107AC00 AS DateTime), CAST(0x0000ADB60020F580 AS DateTime), CAST(0x0000AE6B011826C0 AS DateTime), CAST(0x0000AE6C00317040 AS
DateTime), 11, CAST(0x0000AE6B011827EC AS DateTime), CAST(0x0000AE6C0031716C AS DateTime), CAST(0x0000AF210107AAD4 AS DateTime), CAST(0x0000AF220020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D201179BCA AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2022, N'Sunday', CAST(0x0000AF210107AC00 AS DateTime), CAST(0x0000AF220020F580 AS DateTime), CAST(0x0000AFD7011826C0 AS DateTime), CAST(0x0000AFD800317040 AS
DateTime), 11, CAST(0x0000AFD7011827EC AS DateTime), CAST(0x0000AFD80031716C AS DateTime), CAST(0x0000B08D0107AAD4 AS DateTime), CAST(0x0000B08E0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D201182176 AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2023, N'Sunday', CAST(0x0000B08D0107AC00 AS DateTime), CAST(0x0000B08E0020F580 AS DateTime), CAST(0x0000B14A011826C0 AS DateTime), CAST(0x0000B14B00317040 AS
DateTime), 11, CAST(0x0000B14A011827EC AS DateTime), CAST(0x0000B14B0031716C AS DateTime), CAST(0x0000B2000107AAD4 AS DateTime), CAST(0x0000B2010020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D2011849FB AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
INSERT [DBO].[AUSTRALIA_DAYLIGHT_SAVING_TABLE] ([YEAR], [DAYLIGHT_START_DAY], [DAYLIGHT_START_DT_UTC], [DAYLIGHT_START_DT_LOCAL], [DAYLIGHT_END_DT_UTC], [DAYLIGHT_END_DT_LOCAL], [HOURS_DIFF_DURING_DAYLIGHT], [AEST_START_DT_UTC], [AEST_START_DT_LOCAL], [AEST_END_DT_UTC],
[AEST_END_DT_LOCAL], [HOURS_DIFF_DURING_AEST], [REC_UPDT_USER], [REC_LOAD_DT], [COMMENTS]) VALUES (2024, N'Sunday', CAST(0x0000B2000107AC00 AS DateTime), CAST(0x0000B2010020F580 AS DateTime), CAST(0x0000B2B6011826C0 AS DateTime), CAST(0x0000B2B700317040 AS
DateTime), 11, CAST(0x0000B2B6011827EC AS DateTime), CAST(0x0000B2B70031716C AS DateTime), CAST(0x0000B36C0107AAD4 AS DateTime), CAST(0x0000B36D0020F454 AS DateTime), 10, N'ABC\shivendoo.kumar', CAST(0x0000A2D20118BA9A AS DateTime), N'Day light saving starts
each year October first Sunday so Time difference between UTC and AUS Local Time will be 11 hours from startdate')
GO
Thanks Shiven:) If Answer is Helpful, Please Vote

Similar Messages

  • DATE vs DATETIME conversion

    I am running into a strange issue which is preventing me to finish my project. Any help would be greatly appreciated. 
    It looks like the CONVERT (the same goes for CAST) function treats DATE and DATETIME conversions differently when executed by a user with the Dutch language settings.
    Here is what I mean, I run the following query:
    SELECT CONVERT(DATE, '2014-09-01 23:00:00'), CONVERT(DATETIME, '2014-09-01 23:00:00')
    The results are:
    2014-09-01, 2014-01-09 23:00:00
    The conversion to DATETIME swapped the month and the day around, while this doesn't happen for the DATE conversion. The DATE conversion is the correct format, since I supplied it YYYY-MM-DD HH:mm:ss.
    When I run the same query using a user with the default language settings (en-US I assume) the same query works fine (no swapping of month and day values). 
    Can someone explain why this is happening? And maybe more important how to prevent it or workaround it (changing the language for the user from Dutch to default is not an option)? 
     

    >> Can someone explain why this is happening? And maybe more important how to prevent it or workaround it (changing the language for the user from Dutch to default is not an option)? <<
    CONVERT() is an old Sybase string function. It was created to keep 960's COBOL programmers happy since SQL does not have a PICTURE clause to put data in display formats. 
    CAST() is the ANSI/ISO Standard function to convert data types and this is what you should be using. It is not a string function. It uses the ISO-8601 standard for dates (yyyy-mm-dd), as you have seen. This is the only -– repeat, only! -- format allowed in
    SQL. Microsoft is a few decades behind and trying to catch up now.
    A good SQL programmer will do any local display formatting in the presentation, which will handle local languages that are never used in the database. Want to have some fun? The names of months in Polish, Czech, Croatian, Ukrainian and Belarusian not based
    on the Latin names used in most European languages. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • XML DateTime conversion in C#

    I have an XML document where the datetime format is;
    "Wed May 08 2007 00:00:00 GMT-0600" and I need to convert it in C# to any DateTime as long as it works in C#....Help Please Andy

    Try:
    SELECT CONVERT(varchar,CONVERT(smalldatetime, '3/22/2010 4:28:23 PM', 101),101)+
    SPACE(1)+
    LEFT(CONVERT(varchar,CONVERT(smalldatetime, '3/22/2010 4:28:23 PM', 101),108),5);
    -- 03/22/2010 16:28
    Datetime conversions:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Getting difference between GMT time and Local time

    Folks,
    I am trying to get difference between gmt time and local time for Korea time zone.
    which should be 9 hours.
    Instead of 9, I am getting 15 hours diff.
    What am I doing wrong?
    Here's what I did to test it:
    First I set the system (Windows XP) time zone to Soul (Korea GMT+9hours) time zone.
    Then I ran the following program, and I got 15 hour diff, not 9.
    Thank you in advance!
    import java.util.*;
    public class Using_GregorianCalendar
         public static void main(String args[])
              Using_GregorianCalendar ugc = new Using_GregorianCalendar();
              ugc.getTimeDiff();
         public void getTimeDiff()
              Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
              Calendar cal1 = new GregorianCalendar(cal.get(Calendar.YEAR),
                                           cal.get(Calendar.MONTH),
                                           cal.get(Calendar.DATE),
                                           cal.get(Calendar.HOUR_OF_DAY),
                                           cal.get(Calendar.MINUTE),
                                                      cal.get(Calendar.SECOND));
            int gmtHour          =  cal.get(Calendar.HOUR); //(Calendar.HOUR_OF_DAY);
            int gmtHourOfDay =  cal.get(Calendar.HOUR_OF_DAY);
            int gmtMonth        =  cal.get(Calendar.MONTH);
            int gmtYear          =  cal.get(Calendar.YEAR);
            int gmtMinute       =  cal.get(Calendar.MINUTE);
            int gmtSecond     =   cal.get(Calendar.SECOND);
            int gmtDate         = cal.get(Calendar.DATE);
            Calendar localCal  = Calendar.getInstance();
            int localHourOfDay = localCal.get(Calendar.HOUR_OF_DAY);
            int timeDiff = (localHourOfDay - gmtHourOfDay);
              //Korea time is GMT + 9 hours so I should get a difference of 9
              //why am I getting difference of 15?
                 System.out.println("************** in getTimeDiff() **********************");
              System.out.println("gmtDate: "+gmtDate);
              System.out.println("gmtHour: "+gmtHour);
              System.out.println("gmtHourOfDay: "+gmtHourOfDay);
              System.out.println("localHourOfDay: "+localHourOfDay);
              System.out.println("timeDiff: "+timeDiff);
              System.out.println("**********************************************************");
         }//getTimeDiff()
    }//class Using_GregorianCalendar
    /*              here's the output of this program:
         ************** in getTimeInGMT() **********************
         gmtDate: 14
         gmtHour: 6
         gmtHourOfDay: 18
         localHourOfDay: 3
         timeDiff: -15
    */

    DrClap wrote:
    sabre150 wrote:
    Nearly correct since the Daylight saving may or may not be in effect which does depend on the date...I would simplify that to this:
    TimeZone korea = TimeZone.getTimeZone("Asia/Seoul");
    long delta = korea.getOffset(new Date().getTime());
    System.out.println(delta / (1000.0 * 60 * 60));That's assuming that the OP really meant UTC when he/she said "GMT". Most people don't realize there's a distinction and that Java's timezones are all based relative to UTC.I suspect you are right in assuming that the OP want UTC and not GMT. I figured it was better to illustrate that the method can be used for getting the time difference between any two TimeZones.

  • How can I display local time in Melbourne, Australia? I am using FF4 with Windows XP

    I just installed FF 4. In the prior FF version I had a display of the local time in Melbourne, Australia on the lower left side of the screen. After installing FF 4, I no longer have this display. How can I get it back?

    Hello Richard,
    Joel has created a nice [url http://joelkallman.blogspot.com/2010/09/automatic-time-zone-support-in.html]blogpost for describing a new feature in APEX 4.0, which does exactly what you want.
    If you don't have APEX 4.0 or can't move to "TIMESTAMP WITH LOCAL TIME ZONE", you could try to build that yourself. There's a [url http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript]nice example on how to determine the clients timezone in Javascript, which you could use to populate a hidden item on your login page, which you could store in an application item afterwards.
    -Udo

  • Local Currency conversion in PO

    Hi
    Iam facing problem in wrong Local currency conversion while doing GR reversal for foriegn currency Subcontract PO.
    Local Currency : EUR
    PO Currency     : HUF
    User has entered wrong Exchange rate in OB08. (Indirect Quotation : HUF -> EUR) & did Goods Receipt with reference to PO. After that Exchange
    rate has been corrected immediately, but some GR documents posted with wrong exchange rate.
    To correct the wrong entries, Again Wrong exchange rate has been updated in OB08 & reversed those material document in MBST. But the strange issue is system calculating different local currency for those reversed documents. The Local currency Amount of Goods receipt document & reversed document local currency amount is not matching,Ideally both should match.
    Following observations on this,
    1. Exchange rate are same in both doucments. I have checked in document Header.
    2. GR Qty & Reversed Qty are same.
    3. PO currency (HUF) amount are same in both doucments.
    4. Finished Material & Raw material are managed in standard Price.
    5. Document date & Posting date are same in both doucments.
    Anybody can explain why the system updates wrong local currency ?
    Thanks in Advance.
    Regards,
    RRS

    I do not remember the Tcode, however it is under SPRO>>General setitings>> currency .. guess it is OB90
    And if the difference is large. check the following:
    Check the exchange rate type you use, next go to OB08 and see if the inverse translation is maintained for your currencies  EUR- HUF and HUF- EUR
    and then check OB07 and see what settings you have for the ex. rate type you have i.e Inv, fixed ...
    You might hit upon something here

  • Report Scheduling. How to syncronize the GMT and the local server timezones

    Hi everybody, I need to schedule reports using the Schedule tab on BIP, but I didn't still understand how the syncronization between my server's timezone and the GMT timezone works.....
    I noticed that when I open the Report Schedules initial page, this is refreshed using the GMT timezone as follows:
    Page Refreshed   Monday, July 26, 2010 7:53 AM GMT
    Actually I'm located in Athens (GMT+3)
    I noticed that if I want to Run once a report, ONLY the GMT is took in consideration.
    For example, I want to run a report at 11.30 (Athens timeone) where the time conditions are the following:
    BIP time (GMT timezone): 08.00 AM GMT
    server timezone: 11.00 AM (Athens time)
    So, if I want to run a report at 11.30 AM (Athens time), I have to write in BIP (Run once) 08.30 AM, instead of 11.30, otherwise if I put 11.30, the report runs 3 hours and 30 minutes later instead of only 30 minutes !!! This is very frustrating....because it means that everytime I need to remember that there is a difference of 3 hours and if I want effectively....
    I also set the Report Formatting Time Zone = GMT+03:00 to fill the gap between the GMT's timezone and Athens's timezone but it didn't work....
    I found that the variable <xsl:param name="_XDOTIMEZONE">GMT</xsl:param> is set into the tmpl.xsl; I tried to change it (GMT+3 or GMT+03:00), I stop and restart the BIP server....but nothing...the BIP timezone is always GMT (as showed by th Page Refreshed date and time).
    At the end my question is this: is there a way to modify the internal BIP timezone in order to fill the gap between this and the server timezone ?
    In other words, I'd like to see the page refreshed with the server timezone (Athens timezone) and not the GMT timezone, in order to schedule reports thinking directly my local server timezone (and not think always to calculate how many hours is the difference).
    This, I think is a common issue for everybody, but....I didn't find nothing in the forum....
    If somebody found a workaround, every help will be appreciated.
    Thanks
    Alex

    Good Morning Vetsrini,
    I know that the "Report Formatting Time Zone" is used to set the timezone properly INSIDE the report...but my attention now is concentrated on the Scheduling...
    As I mentioned before I'd like to find a way to syncronize the BIP timezone (based on GMT) and my local server timezone (Athens, GMT+2), and this I think it's possiblie only if I can modify the BIP timezone (GMT): instead to have GMT, I'd like to have GMT+2 in order to have the same time in both of systems.
    I already tried to change the variable <xsl:param name="_XDOTIMEZONE">GMT</xsl:param> into the tmpl.xsl, but it didn't work....
    I don't understand how all the others millions of BIP users who don't live in UK can use the scheduler keeping in mind always the gap between their local time and the GMT time set in BIP......
    Do you have another hint or workaround ?
    Thanks for your help
    Alex

  • UTC vs GMT - Is there really a difference?

    Is there a difference between setting the TZ variable in /etc/default/init to UTC vs GMT in Solaris 9? Our Oracle DBA is using UTC within the database for a new app and wants the OS to match but all other servers in this customer's environment are set to GMT.

    The way data works would be standard across the packages from your carrier.. however Blackberry users will have to pay an extra monthly fee for their extra services, which would be a waste of money for an Apple iPhone user who does not need to pay anything extra to the carrier for specific services (The optional MobileMe fees are paid to Apple, who I presume own them)
    My carrier offers 1GB of data for those on Apple plans, rather than the standard 500MB.
    So to summarise, swap SIM cards all you like, the data should work. Just be aware of the extras in the contract that you might be paying unnecessarily.

  • Why does my calender reset to gmt instead of local time?

    my  calendar on my iPhone (5s, 8.0.2) resets to gmt instead of local time. This started after I upgraded to ios8
    time zone override is off

    Make sure your settings are correct:
    http://help.apple.com/iphone/8/#/iph3d11102c

  • Local Currency conversion program(Standard) - Manually starting  Fill phase

    Hi experts
    I am having a problem running the local currency conversion program.
    The Analyse phase  completed with 3 warnings but can not start the Fill phase automatically . How can we start it off from this stage to the next (fill) stage or what could be the source of the error.
    all suggestions will be appreciated

    Hi,
    Try using the FM  'CONVERT_TO_LOCAL_CURRENCY'.
    For testing purpose Go to se11 and see the values is TCURR table.
    For eg : If you want the exchange rate as M (which is Month Begin Exchnage rate), the date you are passing to the FM should always Begin of the month.
    FORM calculate_currency
    USING
    lv_date LIKE wa_data-fldate "date is needed as on current date should be set exchange rate (be carefull with type i left my original)
    lv_foreign_amount LIKE lv_totalprice "number
    lv_foreign_currency LIKE wa_data-currency "currency identificator
    lv_local_currency TYPE c "currency identificator
    CHANGING
    lv_local_amount TYPE p. "number
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
    EXPORTING
    CLIENT = SY-MANDT
    date = lv_date
    foreign_amount = lv_foreign_amount
    foreign_currency = lv_foreign_currency
    local_currency = lv_local_currency
    RATE = 0
    TYPE_OF_RATE = 'M'
    READ_TCURR = 'X'
    IMPORTING
    EXCHANGE_RATE =
    FOREIGN_FACTOR =
    local_amount = gv_local_amount
    LOCAL_FACTOR =
    EXCHANGE_RATEX =
    FIXED_RATE =
    DERIVED_RATE_TYPE =
    EXCEPTIONS
    no_rate_found = 1
    overflow = 2
    no_factors_found = 3
    no_spread_found = 4
    derived_2_times = 5
    OTHERS = 6
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. "Calculate_currencytake a look on exceptions which you get after, it might be helpfull
    Please reward points if helpful.
    Regards
    rose

  • How to convert a datetime value to UTC (or GMT)

    I have this problem.
    The user should provide the following inputs:
    - A date time value - i.e: 10 september 2006, 10:40 AM
    - The world location to which that value refers - i.e.: Rome/Italy
    I need as output, the UTC date time value:
    - i.e: 10 september 2006, 8:40 AM
    in this case it is two hours before because during summer time, the Italian timezone is GMT+2
    And if the user enters:
    - A date time value - i.e: 25 december 2006, 10:40 AM
    - The world location to which that value refers - i.e.: Rome/Italy
    The output should be: (UTC time)
    - i.e: 25 december 2006, 9:40 AM
    It only only one hour before because during winter, in italy the timezone is GMT+1
    In few words I need that Java can do by itself all the calculations about the timezone and daylight saving around different places in the world, so that I can store in my DB the universal UTC time.
    Can you suggest me some code or some good URLs?
    Thanks in advance

    I wrote this code, it works but I have still some issues.
              GregorianCalendar abroad = new GregorianCalendar(TimeZone.getTimeZone("Asia/Tokyo"));
              abroad.set(Calendar.YEAR, 2006);
              abroad.set(Calendar.MONTH, 11);
              abroad.set(Calendar.DATE, 25);
              abroad.set(Calendar.HOUR_OF_DAY, 1);
              abroad.set(Calendar.MINUTE, 0);
              abroad.set(Calendar.SECOND, 0);
              System.out.println(abroad.getTime());
            DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
              df1.setTimeZone(TimeZone.getTimeZone("Asia/Tokyo"));
              System.out.println(df1.format(abroad.getTime()));
            DateFormat df2 = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
              df2.setTimeZone(TimeZone.getTimeZone("America/New_York"));
              System.out.println(df2.format(abroad.getTime()));
            DateFormat df3 = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
              df3.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));
              System.out.println(df3.format(abroad.getTime()));          It outputs:
    Sun Dec 24 17:00:00 CET 2006
    luned� 25 dicembre 2006 1.00.00 JST
    domenica 24 dicembre 2006 11.00.00 EST
    domenica 24 dicembre 2006 16.00.00 UTCIn few words this code is able to compute any date from a specific timezone, to other timezone.
    My questions are:
    - Why the first output is in english ? and the other are in italian? (my OS is italian) but I didn't changed the locale in the code, so I don't understand why it outputs english text.
    - When I get the date value in other timezones, I just get a "string" computed by the "format(...)" method of the DateFormat class.
    But I really need to get something "numeric" for every specific value: minutes, hours, day of the month, month, year. Because this class will be used outside java and I don't need a string but something that the user will have formatted in his choosen locale setting for its website. (i think that I was not good to explain this point, i hope that someone can understand)
    However thank you all :)

  • Foreign to Local currency Conversion

    Hi Hyperion Experts,
    For our client we are building a planning model and they have the following requirement. The entity UK needs to be able to fill in expenses in different currencies, so in pounds, Euro, Swiss Francs, USD, etc. At the moment there is only 1 reporting currency and that is USD. Now they want to be able to calculate the entity UK to the local currency pounds. So there needs to be a foreign to local conversion.
    How can this be solved?
    We now have one solution.
    1) Every currency needs to be a reporting currency, but then the model will not perform. There are a lot of enitities and a lot of currencies.
    Do you guys now a more efficient way to solve this problem?
    Regards,
    Eije Wiersema
    Edited by: user10997426 on 15-apr-2009 5:31
    Edited by: user10997426 on 15-apr-2009 5:34

    Your requiremet seems to be of multi currency input across Entities. Whenever, you enter data in Loacl currency with the Currency symbol system picks up that currency as the input currency irrespective of the currency UDA attached to the entity.
    Try this out, input 100 EURO for an Entity whcih has USD as the base. Check the conversions.
    The next requirement is of the currency conversions. If this multi currency requirement is only for some expenses then you can very well modify the existing scripts so that the conversion runs only for those account members and not the entire set of account codes. You can put a specific UDA on these expenses so that you can call the same in the rule.
    Regards,
    Madhavi

  • Varchar to datetime conversion

    I have a column which has 05MAY2006:04:34:00.000000 it is stored as varchar(25). I need to save it as datetime in the same column. I have tried using 
    update tablename
    set columnname = (SUBSTRING(columnname,1,2) + '-' + SUBSTRING(columnname,3,3) + '-' + 
    SUBSTRING(columnname,6,4) + ' ' + SUBSTRING(columnname,11,8));
    and then 
    alter table tablename
    alter columnname datetime;
    but later it shows up the error
    Msg 242, Level 16, State 3, Line 1
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
    How do I change it any other opinion or any modification for the above query. Please help. Thank you.

    UPDATE myTable
    SET targetColumn = STUFF ( targetColumn , 10, 1, ' ')
    -- ddmmmyyyy:hh:mm:ss.nnnnnn
    -- this colon is extra which is at 10th positionALTER TABLE tablenameALTER COLUMN columnnamedatetime2;
    vinny

  • Varchar to datetime conversion out-of-range

    I'm importing data from CSV and I get the following conversion datetime error:
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
    The statement has been terminated.
    I'm using the following statement to convert the datetime from varchar(100) to datetime:
    CONVERT (datetime,TimeIndex,103)
    The date in the CSV is in the following format:
    2015-01-31 23:58:19
    Any ideas what could be causing this?
    Thanks in advance
    Adam

    This could be because of british/American date formats.
    Try importing the following dates: -
    2015-01-01
    2015-01-02
    2015-01-12
    ... and see if that works, then try importing 2015-01-13 and see if that works
    Please click "Mark As Answer" if my post helped. Tony C.

  • Local Voice Conversation Recording with VG224 (Dual home topology)

    Hi Team,
    Hope all you are doing good.
    We have VG224 which is connected to two different Core switch, I have centralized based CUCM BE & one voip recorder in the network, requirement is very simple if any one of the core switch goes down all things should work on alternate Core switch.
    Currently we are able to record voice conversation between any IP to IP phone, any IP to Analogue phone & vice versa & between analogue phones which are connected to two different VOIP Gateways.
    But we couldn't able to record voice conversation between analogue phones which are connected to same VOIP gateway.  Please refer below configuration philosophy and if you have any other suggestion considering below philosophy please suggest.
    I have created two SIP trunk one is from VOIP gateway to Cucm & other one is for CME SRST and managing SIP trunks by using preference. The reason behind creating SIP trunk rather than to get VOIP gateway registered with CUCM is we have dual Ethernet interface and these Ethernet interface are connected to two different Core switches and if i choose to get this VOIP gateways registered with CUCM then I have to specify last 10 character of Mac ID as we have two Ethernet interface then which Ethernet Mac ID will be used? if we are going with same philosophy then analogue phone which are connected to same VOIP gateway doesn't need any IP address to communicate with each other so the result will be the same as mentioned above. If possible then please suggest on the same.
    Thanks,
    Vishal

    Currently my Cisco VG224 is registered with Cucm over MGCP do we have any configuration by doing it we can force VG224 to send local RTP Stream to switch and by using SPAN/RSPAN we can record the same? 

Maybe you are looking for