<?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: string to date/time format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309422#M1198619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typically, you'd use date(date#()) with an appropriate format string.&amp;nbsp; You could handle the example string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;20,110,517,121,922.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;date(date#(left(RESOLVED_DATETIME,10),'YY,YYM,MDD'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or this if you want to avoid string manipulation entirely (unnecessary):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;date(daystart(timestamp#(RESOLVED_DATETIME,'YY,YYM,MDD,hhm,mss.ff')))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2011 00:14:53 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-05-19T00:14:53Z</dc:date>
    <item>
      <title>string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309420#M1198617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Database contains only string charcter, but when I load data on qlikview, I would like to I have some data as date/time format.&lt;/P&gt;&lt;P&gt;How can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 15:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309420#M1198617</guid>
      <dc:creator />
      <dc:date>2011-05-18T15:29:34Z</dc:date>
    </item>
    <item>
      <title>string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309421#M1198618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use date and string functions within your script to convert a value (e.g. number or string) to a date.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I use 'MakeDate', 'Left' and 'Mid' functions to convert my "RESOLVED_DATETIME" number value as follows:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;MakeDate(Left("RESOLVED_DATETIME",4), Mid("RESOLVED_DATETIME",5,2),Mid("RESOLVED_DATETIME",7,2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above example uses 'Left' and 'Mid' functions to define the relevant character blocks I want to represent the year, month and day elements of my date, whilst the 'MakeDate' function creates the date value from the defined elements (e.g. 20,110,517,121,922.00 becomes 17/05/2011 in my example).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember that you will probably have to work around commas as characters in your data if you are working with strings rather than numeric values.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2011 15:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309421#M1198618</guid>
      <dc:creator />
      <dc:date>2011-05-18T15:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309422#M1198619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Typically, you'd use date(date#()) with an appropriate format string.&amp;nbsp; You could handle the example string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;20,110,517,121,922.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;date(date#(left(RESOLVED_DATETIME,10),'YY,YYM,MDD'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or this if you want to avoid string manipulation entirely (unnecessary):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;date(daystart(timestamp#(RESOLVED_DATETIME,'YY,YYM,MDD,hhm,mss.ff')))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 00:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309422#M1198619</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-19T00:14:53Z</dc:date>
    </item>
    <item>
      <title>string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309423#M1198620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to use your solution but doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a a string in my database as 01/01/2011 12:21:34 and I would load as a date/time format in qlikview when I load data in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 10:33:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309423#M1198620</guid>
      <dc:creator />
      <dc:date>2011-05-19T10:33:38Z</dc:date>
    </item>
    <item>
      <title>string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309424#M1198621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John's quite right in highlighting the possible use of other date functions; there are often multiple options available for use depending on your particular data set.&amp;nbsp; Unfortunately, I was unable to utilise the date function in my scenario.&amp;nbsp; Details of date/time or string functions can be found in the reference manual relevant to your implementation of QlikView.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile, what exactly have you tried for your example string "01/01/2011 12:21:34"?&amp;nbsp; If you post the relevant script here perhaps we can consider the syntax with you and help point you to a resolution.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 11:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309424#M1198621</guid>
      <dc:creator />
      <dc:date>2011-05-19T11:30:41Z</dc:date>
    </item>
    <item>
      <title>string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309425#M1198622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can try the below statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date#( FieldName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 12:10:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309425#M1198622</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-05-19T12:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309426#M1198623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;You need to make QlikView recognize that as a timestamp ( date + time). &lt;/P&gt;&lt;P&gt;For you pattern, you need a code like this: &lt;/P&gt;&lt;P&gt;load Timestamp#(ORIGINAL_FIELD, 'DD/MM/YYYY hh:mm:ss') AS NEW_TIMESTAMP_FIELD,&lt;/P&gt;&lt;P&gt;(then the rest of your load script) &lt;/P&gt;&lt;P&gt;FROM ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you put the following code on a text box, you will get 2011 as the year part of the timestamp:&lt;/P&gt;&lt;P&gt;=year(Timestamp#('01/01/2011 12:21:34', 'DD/MM/YYYY hh:mm:ss'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(not sure if your date is DD/MM/YYYY or MM/DD/YYYY you may need to change that!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 13:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309426#M1198623</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-19T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309427#M1198624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to try your solution, but I don't know how, 'cause I've some problem in the script. Where have I put the comand LOAD load Timestamp#(ORIGINAL_FIELD, 'DD/MM/YYYY hh:mm:ss') AS NEW_TIMESTAMP_FIELD FROM ...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I connect qlikview ro a ODBC and with a script I load data, using a select function. I don't know where insert the command load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FULGENZIO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 14:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309427#M1198624</guid>
      <dc:creator />
      <dc:date>2011-05-19T14:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309428#M1198625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It can be like this: &lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;Timestamp#(ORIGINAL_FIELD, 'DD/MM/YYYY hh:mm:ss') AS NEW_TIMESTAMP_FIELD&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;sql select&amp;nbsp;&amp;nbsp; --&amp;gt; here is your original select .&lt;/P&gt;&lt;P&gt;You need to replace&amp;nbsp; ORIGINAL_FIELD and NEW_TIMESTAMP_FIELD by the names you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 14:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309428#M1198625</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-19T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309429#M1198626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FULGENZIO, Your code should be as follows (But you need to tweak this code as per you requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,Timestamp#(ORIGINAL_FIELD, 'DD/MM/YYYY hh:mm:ss') AS NEW_TIMESTAMP_FIELD;&lt;/P&gt;&lt;P&gt;SQL Select * from TABLENAME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 14:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309429#M1198626</guid>
      <dc:creator />
      <dc:date>2011-05-19T14:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: string to date/time format</title>
      <link>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309430#M1198627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much. Your solution works!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FULGENZIO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 15:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/string-to-date-time-format/m-p/309430#M1198627</guid>
      <dc:creator />
      <dc:date>2011-05-19T15:07:14Z</dc:date>
    </item>
  </channel>
</rss>

