<?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>topic Re: Using DATE TIME functions in Qlik Replicate to translate into date and time in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936236#M2820</link>
    <description>&lt;P&gt;Here is a quick example of a case statement format:&lt;/P&gt;
&lt;P&gt;CASE &lt;BR /&gt;WHEN $AR_H_STREAM_POSITION != '' &lt;BR /&gt;THEN &lt;BR /&gt;strftime('%Y-%m-%d',$HCD_FROM_YMD) = source_lookup('NO_CACHING', 'DBO', 'MyMaxTest', 'max(HCD_FROM_YMD)','1=?', '1')&lt;BR /&gt;ELSE 1 &lt;BR /&gt;END&lt;/P&gt;
&lt;P&gt;As for the documentation on the date time functions the best bet is to google SQLite syntax and check out there links.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Michael&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2022 20:15:36 GMT</pubDate>
    <dc:creator>Michael_Litz</dc:creator>
    <dc:date>2022-05-26T20:15:36Z</dc:date>
    <item>
      <title>Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936218#M2816</link>
      <description>&lt;P&gt;I am trying to convert incoming data from DB2 as source into Kafka as Target.&lt;/P&gt;
&lt;P&gt;The dates in DB2 are coming in as Numeric (8,0) in the Task when I select the tables&lt;/P&gt;
&lt;P&gt;They are defined as numeric with values as YYYYMMDD or 99999999&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adbdkb_0-1653592854120.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80414iCAD3EA5DE2EC1198/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adbdkb_0-1653592854120.png" alt="adbdkb_0-1653592854120.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to define the function mapping using one of the date time functions to translate the inputs coming in as 20220525 or 99999999 into valid date format. &amp;nbsp;I couldn't find an example of what the modifier should be if using these functions&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adbdkb_1-1653593260870.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80415iD46919AF506A0EB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adbdkb_1-1653593260870.png" alt="adbdkb_1-1653593260870.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 19:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936218#M2816</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-26T19:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936227#M2817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;adbdkb,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="messageEditor_d551d1e9bd50b7_0" class="MessageEditor"&gt;&lt;A id="previewButton_d551d1e9bd50b7_b588e" class="lia-link-navigation lia-message-editor-preview-button" href="https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936218#" target="_blank"&gt;PREVIEW&lt;/A&gt;
&lt;DIV class="lia-js-block-events"&gt;
&lt;DIV class="lia-form-row lia-form-body-entry"&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="lia-form-input-wrapper"&gt;
&lt;DIV id="rich_d551d1e9bd50b7_b588e" class="message-body-editor lia-inline-message-body-editor"&gt;
&lt;DIV class="lia-inline-ajax-feedback"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="mceu_91" class="mce-tinymce mce-container mce-panel lia-editor-gte-2" tabindex="-1" role="application"&gt;
&lt;DIV id="mceu_91-body" class="mce-container-body mce-stack-layout"&gt;
&lt;DIV id="mceu_92" class="mce-top-part mce-container mce-stack-layout-item mce-first"&gt;
&lt;DIV id="mceu_92-body" class="mce-container-body"&gt;
&lt;DIV id="mceu_93" class="mce-toolbar-grp mce-container mce-panel mce-first mce-last" tabindex="-1" role="group"&gt;
&lt;DIV id="mceu_93-body" class="mce-container-body mce-stack-layout"&gt;
&lt;DIV id="mceu_94" class="mce-container mce-toolbar mce-stack-layout-item mce-first" role="toolbar"&gt;
&lt;DIV id="mceu_94-body" class="mce-container-body mce-flow-layout"&gt;
&lt;DIV id="mceu_95" class="mce-container mce-flow-layout-item mce-first mce-last mce-btn-group" role="group"&gt;
&lt;DIV id="mceu_95-body"&gt;
&lt;DIV id="mceu_52" class="mce-widget mce-btn mce-btn-small mce-first" tabindex="0" role="button" aria-label="Undo" aria-disabled="false"&gt;The replicate expression language is based on SQLite syntax which you can google for additional reference.&lt;/DIV&gt;
&lt;DIV class="mce-widget mce-btn mce-btn-small mce-first" tabindex="0" role="button" aria-label="Undo" aria-disabled="false"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="mce-widget mce-btn mce-btn-small mce-first" tabindex="0" role="button" aria-label="Undo" aria-disabled="false"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="mceu_53" class="mce-widget mce-btn mce-btn-small lia-mce-toolbar-bold" tabindex="0" role="button" aria-pressed="false" aria-label="Bold"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;I think that you will need to use this type of function&amp;nbsp;to format the date.&lt;BR /&gt;strftime&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'%Y %m %d'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'now'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;This example used the 'now' which is a date. I am not sure if you could just replace 'now' with your numeric field or if you will need to massage the numeric field into a string.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alternatively you could cast the number as a string and then do some substr() functions to pull the year month and day out into the correct format.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;As to handling the 99999999 you may need to wrap this in a case statement to catch and deal with it seperatly.&lt;/P&gt;
&lt;P&gt;I hope this starts to help you out.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Michael&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 19:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936227#M2817</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2022-05-26T19:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936232#M2818</link>
      <description>&lt;P&gt;Thanks. &amp;nbsp;So, when using the date(...) function, the first parameter is the string. &amp;nbsp;I &amp;nbsp;am trying to understand why it shows many modifiers and what is expected for the modifiers ?&lt;/P&gt;
&lt;P&gt;date(timestring, modifier, modifier, ...)&lt;BR /&gt;datetime(timestring, modifier, modifier, ...)&lt;BR /&gt;strftime(format, timestring, modifier, modifier, ...)&lt;BR /&gt;julianday(timestring, modifier, modifier, ...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit confused about what is needed for the modifiers. &amp;nbsp;Or how the modifiers are to be used&lt;/P&gt;
&lt;P&gt;Also, where can I find an example of case statement that you have mentioned.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936232#M2818</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-26T20:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936233#M2819</link>
      <description>&lt;P&gt;Here is a substring that will rearrange the format:&lt;/P&gt;
&lt;P&gt;substr($NumericField,5,2) || '/' || substr($NumericField,7,2) || '/' || substr($NumericField,0,5)&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936233#M2819</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2022-05-26T20:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936236#M2820</link>
      <description>&lt;P&gt;Here is a quick example of a case statement format:&lt;/P&gt;
&lt;P&gt;CASE &lt;BR /&gt;WHEN $AR_H_STREAM_POSITION != '' &lt;BR /&gt;THEN &lt;BR /&gt;strftime('%Y-%m-%d',$HCD_FROM_YMD) = source_lookup('NO_CACHING', 'DBO', 'MyMaxTest', 'max(HCD_FROM_YMD)','1=?', '1')&lt;BR /&gt;ELSE 1 &lt;BR /&gt;END&lt;/P&gt;
&lt;P&gt;As for the documentation on the date time functions the best bet is to google SQLite syntax and check out there links.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Michael&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936236#M2820</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2022-05-26T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936245#M2823</link>
      <description>&lt;P&gt;Thanks. &amp;nbsp;I am not sure what am I missing. &amp;nbsp;When I do 'Test Expression', &amp;nbsp;nothing happens. &amp;nbsp;I will take a look at SQLite for syntax. &amp;nbsp;Just want to make sure the way I am calling it here is correct in terms of using it inside Replicate&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adbdkb_0-1653596505315.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80418iFCB937041BBA8C49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adbdkb_0-1653596505315.png" alt="adbdkb_0-1653596505315.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936245#M2823</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-26T20:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936247#M2824</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;adbdkb,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;Try just using the substring it may be all you need - remove the string time function as the substring will put things into a date format.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link"&gt;&lt;SPAN class=""&gt;Thanks,&lt;BR /&gt;Michael&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="messageEditor_d553d69db9e183_0" class="MessageEditor"&gt;&lt;A id="previewButton_d553d69db9e183_b5fef" class="lia-link-navigation lia-message-editor-preview-button" href="https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936218#" target="_blank"&gt;PREVIE&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV id="messageEditor_d553d69db9e183_0" class="MessageEditor"&gt;&lt;A id="previewButton_d553d69db9e183_b5fef" class="lia-link-navigation lia-message-editor-preview-button" href="https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936218#" target="_blank"&gt;PREVIE&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 May 2022 20:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936247#M2824</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2022-05-26T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936250#M2825</link>
      <description>&lt;P&gt;Thanks. &amp;nbsp;Will try that. &amp;nbsp;Can the CASE statement still be added to check if the value is all 9, then set the value to say 20991231 ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936250#M2825</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-26T20:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936257#M2826</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;adbdkb,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, that is what I would do.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;BR /&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936257#M2826</guid>
      <dc:creator>Michael_Litz</dc:creator>
      <dc:date>2022-05-26T20:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936262#M2827</link>
      <description>&lt;P&gt;Just declare the column as DATE (whichever flavor) using a transformation with SUBSTR functions on the NUMERIC to take it apart and glue back together with dashes.&lt;/P&gt;
&lt;P&gt;SQLite will do the number to text for you, as well as the text to date.&lt;/P&gt;
&lt;P&gt;The below works for me (those \n are non-functional whitespace newlines to enhance readability in the UI:&lt;/P&gt;
&lt;P&gt;The tricky part is to decide what to do with invalid dates. For the you could first feed the thusly&amp;nbsp; assembled&amp;nbsp; date string into another date-time function and look for a result. If there is a valid result provide the assembled (again) date else a trigger value like 1900-01-01. That's left as an exercise to the reader based on actual needs. I would NOT bother with 1900 &amp;lt; YYYYY &amp;lt; 2300, 0 &amp;lt; MM &amp;lt; 13, 0 &amp;lt; DD &amp;lt; 32.&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"table_manipulation":	{
	"owner":	"dbo",
	"name":	"test",
	"transform_columns":	[{
			"column_name":	"yyyymmdd",
			"action":	"KEEP",
			"new_data_type":	"kAR_DATA_TYPE_DATE",
			"computation_expression":	"substr($yyyymmdd,1,4) || '-' ||\nsubstr($yyyymmdd,5,2) || '-' ||\nsubstr($yyyymmdd,7,2)\n"
		}, ....&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2022 20:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936262#M2827</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-05-26T20:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936584#M2828</link>
      <description>&lt;P&gt;And I will have to do this for each DATE column, right?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;Will I be able to define a common transformation routine and apply it to any date ? &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If the common routine is possible, how would I achieve that?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 13:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936584#M2828</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-27T13:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936863#M2844</link>
      <description>&lt;P&gt;So, I defined this for transformation and set the column type as DATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CASE &lt;BR /&gt;WHEN $POLICY_ISSUE_DATE == 99999999&lt;BR /&gt;THEN &lt;BR /&gt;strftime('%m-%d-%Y','2199-12-31')&lt;BR /&gt;ELSE&lt;BR /&gt;strftime('%m-%d-%Y', substr($POLICY_ISSUE_DATE,0,5) || '-' || &lt;BR /&gt;substr($POLICY_ISSUE_DATE,5,2) || '-' || &lt;BR /&gt;substr($POLICY_ISSUE_DATE,7,2))&lt;BR /&gt;END&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I test the expression in the builder, it works fine for both 99999999 as well as e.g. 20220523&lt;/P&gt;
&lt;P&gt;But when I run the task that has this transformation, I get the below error&lt;/P&gt;
&lt;P&gt;(subtask 1 thread 1) is suspended. Failed to init column calculation expression&lt;/P&gt;
&lt;P&gt;How can I debug this in Qlik? &amp;nbsp; I do not have direct access to see the data in the database, hence I cannot easily check the incoming value from database&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 15:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936863#M2844</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-28T15:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936876#M2845</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/177259"&gt;@adbdkb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So, I defined this for transformation and set the column type as DATE&lt;/P&gt;
&lt;P&gt;:&lt;/P&gt;
&lt;P&gt;ELSE&lt;BR /&gt;strftime('%m-%d-%Y', substr($POLICY_ISSUE_DATE,0,5) || '-'&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hmm, I cannot try just&amp;nbsp; now but I do not see the value of using strftime for this use case as all it will deliver is a string in the exact same format it was provided with. More moving parts, more possible issues, more overhead.&lt;/P&gt;
&lt;P&gt;Case in point, the format used is incorrect. It should be %Y-%m-%d.&lt;/P&gt;
&lt;P&gt;Furthermore, the substr function&amp;nbsp; offset argument is 1 based and using 0 may fail or produce surprise results. Plus don't you want 4 chars for the year, not 5 as requested.&lt;/P&gt;
&lt;P&gt;Hein&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 02:25:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936876#M2845</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-05-29T02:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936879#M2847</link>
      <description>&lt;P&gt;When I used it without strftime - the data always showed "0000-00-00" in Kafka. &amp;nbsp;That is why wanted to use the strftime since I had set the column type as DATE. &amp;nbsp;But I tried setting it string and used without strftime, but still was getting error. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Both the formats, when tested in the UI, give the expected output? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also observed I had used below to test creating a column using function. &amp;nbsp;That also gives the exact same error&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(subtask 1 thread 1) is suspended. Failed to init column calculation expression&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'{&lt;BR /&gt;"key2": {&lt;BR /&gt;"COMPANY_CODE": "' || $$COMPANY_CODE || '",&lt;BR /&gt;"MASTER_ID": "' || $$MASTER_ID || '"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;'&lt;/P&gt;
&lt;P&gt;How should we define functions in the UI for transformation?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 02:34:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936879#M2847</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-29T02:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936882#M2848</link>
      <description>&lt;P&gt;Output from the transformation function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adbdkb_0-1653792343936.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80548iAE396F4252C5FC7B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adbdkb_0-1653792343936.png" alt="adbdkb_0-1653792343936.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adbdkb_1-1653792395490.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80549i26657C2F880D0B86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adbdkb_1-1653792395490.png" alt="adbdkb_1-1653792395490.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 02:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936882#M2848</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-29T02:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936915#M2849</link>
      <description>&lt;P&gt;You are not listening/reading or were misguided by an early incorrect example.&lt;/P&gt;
&lt;P&gt;Dates are YYYY-MM-DD not the crappy (American) MM-DD-YYYY&lt;/P&gt;
&lt;P&gt;My example was fully tested with Oracle Source, SQLserver date2 column output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The string example looks all broken also.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the intend with the $$&lt;SPAN&gt;COMPANY_CODE? Variables are introduced with a single dollar sign. If you want a dollarsign in the result it should be within the single quotes:&amp;nbsp;&amp;nbsp;..."$' || $COMPANY_CODE || '",....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 13:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936915#M2849</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-05-29T13:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936921#M2850</link>
      <description>&lt;P&gt;I wasn't / am not sure how to define this in the UI. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;"table_manipulation":	{
	"owner":	"dbo",
	"name":	"test",
	"transform_columns":	[{
			"column_name":	"yyyymmdd",
			"action":	"KEEP",
			"new_data_type":	"kAR_DATA_TYPE_DATE",
			"computation_expression":	"substr($yyyymmdd,1,4) || '-' ||\nsubstr($yyyymmdd,5,2) || '-' ||\nsubstr($yyyymmdd,7,2)\n"
		}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I shall try just the expression starting with substrate and test again. &amp;nbsp;Is the CASE statement syntax part correct? &amp;nbsp;To handle 999999999 ? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;The $$COMPANY_CODE is a typo / mistake on my part. &amp;nbsp;Didn't realise it had duplicate $ sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 15:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936921#M2850</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-29T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936936#M2851</link>
      <description>&lt;P&gt;That's the result of an export task.&lt;/P&gt;
&lt;P&gt;Once you understand/know what you want change the JSON is often easier IMHO, notably for bulk changes.&amp;nbsp; Just feed a smart script a list of table/column names and let it spit out the desired ammended json. Import.&lt;/P&gt;
&lt;P&gt;Export your own and you'll see how a new-line in the gui&amp;nbsp; maps to \n - which I explained to be just whitespace. To use in the GUI retype along the pattern&amp;nbsp; or go into a text editor, past the expression, replace my example variable names with the real ones and remove \n or replace with line-breaks as desired.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The case statement looks good, except that the strftime complexity breaks the correct and sufficient '2199-12-31' - get rid of it. KISS&lt;/P&gt;
&lt;P&gt;Hein&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 20:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936936#M2851</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-05-29T20:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936938#M2852</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/110970"&gt;@Heinvandenheuvel&lt;/a&gt;&amp;nbsp; - &amp;nbsp;now I understood how that json part should be used. &amp;nbsp;I just started using Qlik a couple of weeks ago and still trying to figure out how I can best use the functionality it provides. &amp;nbsp;I was asked to create Qlik task using the DB2 input and Kafka json output. &amp;nbsp;And I have been trying to look at examples and documentation to get it working.&lt;/P&gt;
&lt;P&gt;I really appreciate the help / guidance that you have provided&lt;/P&gt;
&lt;P&gt;I will apply the above method and update all the date fields after first exporting the task as a json file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more ( hopefully last ) question&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I basically have to create a key column in JSON format by using the 2 primary keys from the DB2&lt;/P&gt;
&lt;P&gt;I tried this way, but it puts \" in the output. &amp;nbsp;I just want to have the expression as json&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'{' || &lt;BR /&gt;'"CompanyCode":"' || $COMPANY_CODE || '",' || &lt;BR /&gt;'"MasterId":"' || trim($MASTER_ID) || '"' || &lt;BR /&gt;'}'&lt;/P&gt;
&lt;P&gt;What do I need to do to get the correct value in json format?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 20:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1936938#M2852</guid>
      <dc:creator>adbdkb</dc:creator>
      <dc:date>2022-05-29T20:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using DATE TIME functions in Qlik Replicate to translate into date and time</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1937407#M2863</link>
      <description>&lt;P&gt;I only tested the expression in the GUI. Parse prompts for&amp;nbsp;COMPANY_CODE and&amp;nbsp;&lt;SPAN&gt;MASTER_ID as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Providing 'aap' and 'noot' as values the Test expression results are: {"CompanyCode":"aap","MasterId":"noot"}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That's what I expected. Hmmm.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 22:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Using-DATE-TIME-functions-in-Qlik-Replicate-to-translate-into/m-p/1937407#M2863</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2022-05-30T22:10:47Z</dc:date>
    </item>
  </channel>
</rss>

