<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: DateTime issue in DataServices in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142538#M3660083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gotcha. I have corrected the code and its definitely coming through correctly without defaulting the values. Thank you again for your help Dirk!!!!!! &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Appreciated,&lt;/P&gt;&lt;P&gt;Tiff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2014 18:24:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-03-13T18:24:13Z</dc:date>
    <item>
      <title>DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaq-p/10142532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a weird issue with an ETL in DS. What is going on is we have 2 data flows that import information, one imports sale header info and the 2nd imports sales detail information. For one of the fields that is being imported is for our SaleDate. For our DF that imports the Sales header information the SalesDate mapping looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IFTHENELSE(BISALESORDERMAST.SALESDATE &amp;gt; '1900.01.01 00:00:00',to_date(to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd') , '1900.01.01 00:00:00')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when the column is populated we get dates like so: '2014-01-05 00:00:00.000' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in our DF that imports the sales detail information, for our SalesDate column we're using this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IFTHENELSE(BISALESORDERMAST.SALESDATE &amp;gt; '1900.01.01 00:00:00', to_date(to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd'), &lt;/STRONG&gt;&lt;STRONG&gt;to_Date(to_char(BISALESORDERMAST.CREATEDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when the column populates here we get dates like this: '2014-01-05 02:03:00.000' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SalesDate for the sales detail table used to look identical as the sales header salesdate column until a single join was removed between the 2 files that we use to populate the sales detail table. Has anyone else experienced this or know why this would happen? Also how do I make the time all zeroes but keep the format of &lt;STRONG&gt; '1900.01.01 00:00:00'&lt;/STRONG&gt;? Why would removing the join now populate the time, where before removing the join the time was set to 00:00:00.000'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!!! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 14:33:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaq-p/10142532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-13T14:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142533#M3660078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tiffany,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is interesting! Are the data type of both BISALESORDERMAST.SALESDATE and BISALESORDERMAST.CREATEDATE same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone else experienced this or know why this would happen?&lt;/P&gt;&lt;P&gt;I haven't come across this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also how do I make the time all zeroes but keep the format of &lt;STRONG&gt;'1900.01.01 00:00:00'&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;The syntax looks right, but may be you could try over-riding the time to 00:00:00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would removing the join now populate the time, where before removing the join the time was set to 00:00:00.000'?&lt;/P&gt;&lt;P&gt;What kind of join are you trying to remove? Try executing the DF in debug mode and check the results at each stage. That could help you identify the place (or query) where this is happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arun J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 14:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142533#M3660078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-13T14:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142534#M3660079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The datatypes of both the &lt;SPAN style="color: #333333; font-size: 12px;"&gt;BISALESORDERMAST.SALESDATE and BISALESORDERMAST.CREATEDATE are the same. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;2. I did over ride the time with 00:00:00 and this does work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;3. The join that was removed was an outter join since the salesdate was not ALWAYS present so we then would use the createdate, so now currently the 2 files in the data flow are an inner join now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;4. I will definitely be running this in debug mode at some point today to see if I can find where it happening! Just still little confused as to why a join would adjust the format!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 15:13:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142534#M3660079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-13T15:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142535#M3660080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your syntax is not 100% correct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose BISALESORDERMAST.SALESDATE contains 2014-01-05 02:03:00.000,&lt;/P&gt;&lt;P&gt;then to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd hh24:mi:ss') results into the character string '2014-01-05 02:03:00.000' and your statement&lt;/P&gt;&lt;P&gt;to_date(to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd') is then equivalent to to_date( '2014-01-05 02:03:00.000','yyyy.mm.dd').&lt;/P&gt;&lt;P&gt;The format does not match the input string! Hence the unpredicatble result?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewriting as to_date(to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd'),'yyyy.mm.dd') will get you rid of the time part automatically .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 17:44:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142535#M3660080</guid>
      <dc:creator>former_member187605</dc:creator>
      <dc:date>2014-03-13T17:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142536#M3660081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dirk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I apologize, I'm still a little confused. The statement in the data flow has always been: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IFTHENELSE(BISALESORDERMAST.SALESDATE &amp;gt; '1900.01.01 00:00:00', to_date(to_char(BISALESORDERMAST.SALESDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;to_Date(to_char(BISALESORDERMAST.CREATEDATE, 'yyyy.mm.dd hh24:mi:ss'),'yyyy.mm.dd'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before removing the join produced &lt;SPAN style="color: #333333; font-size: 12px;"&gt; '2014-01-05 00:00:00.000&lt;/SPAN&gt;' the table this comes from either BISALEORDERMAST.SALESDATE or BISALEORDERMAST.CREATEDATE do have the times in there. So I guess Im confused what removing the join did to make the time populate. So with that statement produced the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the join: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;2014-01-05 00:00:00.000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;after removing the join:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;2014-01-05 02:03:00.000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;If the values from the salesordermast table remained the same..why would removing the join allow the times to come through when the syntax was the same?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Tiff&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 17:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142536#M3660081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-13T17:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142537#M3660082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no obvious reason why. In fact, DS should issue an error message. But it doesn't. An until now undetected feature of the software &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;As a side-effect, the outcome of your statement is unpredicable. That's what you are experiencing: you change the code, the result may be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct your syntax and you'll always get the desired results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 18:07:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142537#M3660082</guid>
      <dc:creator>former_member187605</dc:creator>
      <dc:date>2014-03-13T18:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime issue in DataServices</title>
      <link>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142538#M3660083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gotcha. I have corrected the code and its definitely coming through correctly without defaulting the values. Thank you again for your help Dirk!!!!!! &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/651/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Appreciated,&lt;/P&gt;&lt;P&gt;Tiff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2014 18:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/datetime-issue-in-dataservices/qaa-p/10142538#M3660083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-03-13T18:24:13Z</dc:date>
    </item>
  </channel>
</rss>

