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

Similar Messages

  • Disallowed implicit conversion from data type datetime to data type timestamp

    Received error: [Macromedia][SQLServer JDBC
    Driver][SQLServer]Disallowed implicit conversion from data type
    datetime to data type timestamp, table 'myTbl', column 'duration'.
    Use the CONVERT function to run this query.
    I have a field named duration hh:mm:ss.lll that I am trying
    to insert into MS SQL. DB has field defined as [duration]
    [timestamp] NOT NULL,
    My insert has this: INSERT INTO myTbl( duration) VALUES(
    <cfqueryparam value="2006-05-26 11:12:13"
    cfsqltype="CF_SQL_TIMESTAMP"/> )
    Why does this not work? rrrrrrrrrrrrrr! BTW: also tried with
    seconds as 13.111 which did not work. Does the db duration need to
    be date? I just want to store a duration for the time of a movie...
    10 Q

    quote:
    Originally posted by:
    quiet1
    Received error: [Macromedia][SQLServer JDBC
    Driver][SQLServer]Disallowed implicit conversion from data type
    datetime to data type timestamp, table 'myTbl', column 'duration'.
    Use the CONVERT function to run this query.
    I have a field named duration hh:mm:ss.lll that I am trying
    to insert into MS SQL. DB has field defined as [duration]
    [timestamp] NOT NULL,
    My insert has this: INSERT INTO myTbl( duration) VALUES(
    <cfqueryparam value="2006-05-26 11:12:13"
    cfsqltype="CF_SQL_TIMESTAMP"/> )
    Why does this not work? rrrrrrrrrrrrrr! BTW: also tried with
    seconds as 13.111 which did not work. Does the db duration need to
    be date? I just want to store a duration for the time of a movie...
    10 Q
    Duration as a timestamp? How odd, most people would store it
    as an integer. Or, if you want to build your own string, the syntax
    is {ts 'yyyy-mm-dd hh:mm:ss'}. The seconds might not be required.
    In any event, use createodbcdatetime() for the value you want
    to put into your table.

  • 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

  • ANSI X12 meta data availability in conversion agent??

    Hello,
    Is there a provision for availability of ANSI X12 meta data in SAP conversion agent. We are trying to process EDI orders using the X12 INDUSTRY standard. Please advise.
    -Kris

    hi,
    SAP Conversion Agent together with SAP Net Weaver, enables  to automate complex integration activities for a multitude of data and document formats. These include unstructured and partially structured documents such as Office files, data streams, printing applications, and other application-specific formats.
    Easily integrate unstructured and semi-structured data into SAP Net  Weaver Process Integration using the Conversion Agent.
    Conversion Agent dynamically converts unstructured messages from   Microsoft Word,Excel,PDF plain text. 
    Semi-structured formats such as HL7,SWIFT,HIPA, ANSI X12 and COBOL to   PI understandable SOAP XML.
              So that it helps to easily integrate the information need into the back-end systems. Conversion can also be used as the reverse process to convert from XML to unstructured or semi-structured formats
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sap%2bconversion%2bagent%2b-%2bthe%2blong%2bjourney
    Conversion Agent - Handling EDI termination characters
    Conversion Agent a Free Lunch?
    Integrate SAP Conversion Agent by Itemfield with SAP XI
    regards
    sr

  • Please HELP!!!  Issue w/ Transformation from date to dateTime type

    Hi Guys,
    I'm having a problem with converting date to dateTime. We have a webservice that contain dateTime type and the input is date type. Is there a simple way to convert/transform a date to dateTime format? Example date = "2009-09-12", need to convert to dateTime = "2009-09-12T00:00:00". Thanks for helping!!!

    For this specific situation you could also make use of the concat string funtion: concat(date, 'T00:00:00'). The result equals your dateTime format.
    Kind Regards,
    Andre

  • MinList function is not working in Date or datetime values in DRM

    Hi,
    We have a custom property End Date with data type as Date. We want to calculate the minimum end date across all the children of a particular node.
    While using the below function it is giving blank value as output.
    MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.NO_ALL_ALL_ENDDATE),[comma],#,true),#,date)
    If we remove the MinList part and only evaluate ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.NO_ALL_ALL_ENDDATE),[comma],#,true), we are getting an output like 12/31/2019#12/31/2018.
    Why DRM is not able to extract the min value? Does DRM not support this kind of use of this function?
    We have even tried with a date time property, but the result is same.
    If by using the above mentioned method it is not possible to get the min date value, what alternative approach can be taken for achieving this?
    Any help on this is much appreciated.
    Thanks
    Sudipta

    I found this useful, check if it helps,
    Using MinList and MaxList with Date Or DateTime Values In DRM (Doc ID 1967005.1)
    Hyperion Data Relationship Management - Version 11.1.2.3.000 and later
    Information in this document applies to any platform.
    GOAL
    Example: How can we calculate the minimum end date across all the children of a particular node?
    You have a custom property End Date with data type as Date. You have tried using MinList in conjunction with ListNodePropValues thus:
    MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.EndDate),[comma],#,true),#,date)
    This gives a blank value as output.
    SOLUTION
    The most robust way of doing this using formulas is to format the date property as a string in ISO 8601 format. In yyyy-mm-dd format, alphabetic order is also date order. Add a helper String property like this:
    FormattedDate(Custom.EndDate),yyyy-mm-ddThh:mm:ss) -- omit the time from the 'T' on if desired. Note that the format string is case sensitive.
    Then the MinList function
      MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.Helper),[comma],#,true),#,string)
    will work.
    Note that the functions MinList and MaxList return a blank value if the list contains any members that are not of the specified data type. Using ReplaceStr will implicitly convert the dates into strings, causing MinList and MaxList to fail if you specify DateTime.

  • 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

  • Labview Date to SQL Server DateTime Conversion

    I have inherited a database of legacy data (created by Labview software) and I need to import that data into a SQL Server 2000 database.
    One of the fields I'm importing includes a string of numbers which respresents a datetime field - in the following format:
    3172089659
    which represents the number of SECONDS since Jan 1 1904 12:00 am Universal Time
    (Was that a significate date in history ?)
    Is there a built in function within SQL that can help be convert this into a standard SQL Server DateTime format during import?
    Thank you
    Devon Kyle

    Devon,
    This can be somewhat database dependent. I don't know how the standard SQL Server handles date addition. However,most have it. One which I uses has the following:
    SECONDS( datetime-expr, integer-expr ) Add integer-expr seconds to the given date/time. If the integer-expr is negative, the appropriate number of seconds are subtracted from the date/time.
    Since you know the start date, this would easily calculate the date you are wanting.
    Hope this helps.
    Russ

  • 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.

  • Not able to convert element of type xs:date to dateTime in XSLT 2.0

    Hi,
    I am trying to subtract 2 dates and get the month difference between the two using XSLT 2.0
    This is what I have done
    <xsl:variable name="monthDiff">
    <xsl:call-template name="monthDifference">
    <xsl:with-param name="date1" select="/tns:StartDate"/>
    <xsl:with-param name="date2" select="xp20:current-dateTime()"/>
    </xsl:call-template>
    Template
    <xsl:template name="monthDifference">
    <xsl:param name="date1"/>
    <xsl:param name="date2"/>
    <xsl:value-of select="(xsd:dateTime($date1) - xsd:dateTime($date2))"/>
    </xsl:template>
    Problem I am facing is
    1. If the value of tns:StartDate is in below format then this transformation works successfully
    2012-08-31T10:00:37+05:30
    2. But I am getting tns:StartDate as input in the below format due to which the transformation fails
    2012-08-31-04:00
    I tried formatting the date in required format but still the transformation fails
    Can someone please help in solving this issue..
    Thanks in Advance.
    Thanks,
    Anju
    Edited by: Anju on Aug 29, 2012 11:10 PM

    Hi Anju,
    Try this...
              <xsl:variable name="monthDiff">
                   <xsl:call-template name="monthDifference">
                        <xsl:with-param name="date1" select="/tns:StartDate"/>
                        <xsl:with-param name="date2" select="xp20:current-date()"/>
                   </xsl:call-template>
              </xsl:variable>
         <xsl:template name="monthDifference">
              <xsl:param name="date1"/>
              <xsl:param name="date2"/>
              <xsl:value-of select="(xsd:date($date1) - xsd:date($date2))"/>
         </xsl:template>Cheers,
    Vlad

  • Need help in date to number conversion

    Hi,
    I have a doubt in a date conversion, please help me.
    I executed the below query, its throwing "invalid number" error.
    select * from test
    where date_sid between to_number(to_char('01-05-2009','dd-mm-yyyy'),'yyyymmdd') and to_number(to_char('02-05-2009','dd-mm-yyyy'),'yyyymmdd')
    date_sid column is number datatype.
    In my above query i want to pass the date value like '12-05-2009'. If i check my table date_sid looks like yyyymmdd. So how to convert '12-05-2009' to 20090512 in my above query. Please help me.
    Thanks.

    Use to_date instead of your to_char, and to_char instead of your to_number.
    That said, that's very very sad to work on date as number format.
    Nicolas.

  • Date to number conversion?

    I want to select a number of rows created within last week.
    To do it I use a select statement with:
    WHERE sysdate-o.created_on <= days;
    (days is a number, created_on is a date)
    Everything works fine, but I get warnings like this one:
    PLW-07204: conversion away from column type may result in sub-optimal query plan
    I suppose I should convert date to number to get rid of them. How can I do it isnide a SELECT query?

    While the comments regarding re-writting the query to allow the possibility of index usage are valid, the warning will still appear even with the re-written query. I am sure that this query would use an index on dt1 if one was available.
    SQL>CREATE TABLE t (id number, dt1 date, dt2 date);
    Table created.
    SQL> CREATE PROCEDURE p1 AS
      2  BEGIN
      3     FOR r IN (SELECT * FROM t
      4               WHERE dt1 = sysdate - 7) LOOP
      5        NULL;
      6     END LOOP;
      7  END;
      8  /
    SQL>/
    SP2-0804: Procedure created with compilation warnings
    SQL>show error
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    3/13     PLW-07204: conversion away from column type may result in
             sub-optimal query planThe warning in this case is clearly spurious, and the reason is, at the level the compiler is looking, they are different data types. dt1 was inserted as sysdate a few minutes before I did the dunp below.
    SQL> SELECT DUMP(dt1) tab_date, DUMP(dt1 - 3) calc_date,
      2         DUMP(sysdate) sys_date
      3  FROM t;
    TAB_DATE                            CALC_DATE                          SYS_DATE
    Typ=12 Len=7: 120,107,2,27,10,45,42 Typ=13 Len=8: 7,215,2,24,9,44,41,0  Typ=13 Len=8: 7,215,2,27,9,49,13,0A date field in a table is a type 12 while sysdate, and any date that has is a result of a calculation is a type 13. Clearly a "different" datatype.
    Practically speaking, in the SQL engine, the type 13 date would be cast to a type 12 date and used in an index probe, but the compiler is likely doing something similar to the DUMP conparision.
    I believe that the type 13 dates are a representation of the C time_t struct that Oracle's kernel would likely use internally.
    John

  • File adapter modules : Access to file data before content conversion

    I have a file sender channel for which content conversion in applied. The incoming file has data in comma separated values format.
    e.g.
    102366,Amol Joshi,DEPT1
    107752,XYZ PQR,DEPT2
    I want to access the the actual data in the file before content conversion takes place. Is it possible to access this data inside the adaper module? I tried creating an adapter module and put it before CallSAPAdapter,it still gets the XML after content conversion as the input data to the module.
    Any pointers?

    Hi Amol,
    I dont know if it is the right approach.
    But if u r not able to meet ur requirement u can do one work around.
    Use Message Transformation Bean to convert it once again in to CSV (flat file structure) and then proceed with ur module.
    There should be a better way than this.
    Hope we could find a better solution in the forum.
    Regards,
    Sudharshan

  • Date Time stamp conversion

    I have a timestamp coming from flat file in the following format YYYY-MM-DD HH:MM:SS.mss(2007-02-21 11:48:31.000)
    to store in Bw I have  created a Object as data type :NUMC and length 14 ,I have conversion routine as times .I was wondering if this will work and also
    can anyone suggest me to covert this as YYYYMMDD and tIme by spliting the field i am getting from flat file.
    Thanks
    Samuel

    Hi Samuel,
    You would need to write a routine for converting.
    Char v_date(8), i_date(18), day(2), month(2), year(2).
    i_date = trans_stru-<your date>.
    day = i_date +  9(2).
    month = i_date + 6(2).
    year = i_date + 5(4).
    concatenate year month day into v_date.
    Result = v_date.
    Bye
    Dinesh
    (Do not forget to assign points!!)

Maybe you are looking for

  • How can I add a rescue email it my Apple ID?

    Hi, I forgot my answers for my security questions and I have to add a recovery email to recover  my answers... So how can I add a rescue email to my Apple ID? Thank you   ~ Ediley

  • How to handle multiple save exceptions (Bulk Collect)

    Hi How to handle Multiple Save exceptions? Is it possible to rollback to first deletion(of child table) took place in the procedure. There are 3 tables txn_header_interface(Grand Parent) orders(parent) order_items (Child) One transaction can have one

  • How to boot your phone into safe mode

    If you experience any problem with your phone, booting it into safe mode can be a good idea to check if any third party applications might be involved in the problem you’re having. If you run your phone in safe mode for a while and you don’t experien

  • Adobe Application Manager Trouble

    I have the creative cloud subscription and everything was working fine until suddenly the application manager decided to stop working. Two of them would open and bounce in my dock and then would say not responding. The only solution I've seen is to u

  • What type of RAM should I buy for Satellite S1800-412 ?

    I have a 1.10Ghz processor and 240MB of RAM but my laptop is struggling with speed, so I am thinking adding extra RAM might be the best solution. Can anyone please help me by advising what type/speed of RAM I need to ask for at a computer parts store