<?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: Converting date/timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367090#M704526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;date(field,'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;makedate(year(Field),month(field),day(field))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look into date funcktions or format funcktions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also go to doc properties, number, and decide the format for each field, but I preffer to bring it already short to save some memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bring date fields as dates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2012 15:59:29 GMT</pubDate>
    <dc:creator>christian77</dc:creator>
    <dc:date>2012-06-25T15:59:29Z</dc:date>
    <item>
      <title>Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367087#M704523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;SPAN&gt;LOAD&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; UserName,&lt;BR /&gt;FirstName,&lt;BR /&gt;LastName,&lt;BR /&gt;Title,&lt;BR /&gt;OU,&lt;BR /&gt;Department,&lt;BR /&gt;Location,&lt;BR /&gt;Emailaddress,&lt;BR /&gt;WhenCreated,&lt;BR /&gt;PaswordLastChanged,&lt;BR /&gt;LastLogonTime,&lt;BR /&gt;AccControl,&lt;BR /&gt;Status,&lt;BR /&gt;PasswordAge,&lt;BR /&gt;AccountLockout,&lt;BR /&gt;AccountExpirationDate,&lt;BR /&gt;NextPwdReset,&lt;BR /&gt;MFID,&lt;BR /&gt;Description,&lt;BR /&gt;Manager,&lt;BR /&gt;SSO,&lt;BR /&gt;"NON_Human";&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 12pt;"&gt;&lt;STRONG&gt;SQL &lt;BR /&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;SELECT UserName,&lt;BR /&gt;FirstName,&lt;BR /&gt;LastName,&lt;BR /&gt;Title,&lt;BR /&gt;OU,&lt;BR /&gt;Department,&lt;BR /&gt;Location,&lt;BR /&gt;Emailaddress,&lt;BR /&gt;WhenCreated,&lt;BR /&gt;PaswordLastChanged,&lt;BR /&gt;LastLogonTime,&lt;BR /&gt;AccControl,&lt;BR /&gt;Status,&lt;BR /&gt;PasswordAge,&lt;BR /&gt;AccountLockout,&lt;BR /&gt;AccountExpirationDate,&lt;BR /&gt;NextPwdReset,&lt;BR /&gt;MFID,&lt;BR /&gt;Description,&lt;BR /&gt;Manager,&lt;BR /&gt;SSO,&lt;BR /&gt;"NON_Human"&lt;BR /&gt;FROM &lt;/STRONG&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;I have a field that contains a date and a timestamp. Its the "LastLogonTime" field. I want to convert the timestamp in all of them to the same thing, all zero's. I want to do it in the script.&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I get that done I want to compare dates. So flag dates that are older than 60 days or 180 days. I want to do that in the front end.&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>Mon, 25 Jun 2012 15:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367087#M704523</guid>
      <dc:creator />
      <dc:date>2012-06-25T15:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367088#M704524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to first ensure that your timestamp (date and time) is interpreted correctly by QV. Easiest way is to set the standard timestamp format variable at the top of your script to the format needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;daystart(LastLogonTime) as LastLogonDateOnly&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create a date only field from your timestamp (time set to 00:00:00).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 15:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367088#M704524</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-25T15:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367089#M704525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ethanjbeau,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try to ltrim or left functions to acquire date from those log fields and add zero's at the end of that field and name it as new field which helps you to compare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left(logfield,10) &amp;amp; '00-00-00' as comparefield. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use left (logfield,8) if you are having year as 2 char's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps and let me know if i got it in a wrong way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Meher&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 15:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367089#M704525</guid>
      <dc:creator />
      <dc:date>2012-06-25T15:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367090#M704526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;date(field,'YYYY/MM/DD')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;makedate(year(Field),month(field),day(field))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look into date funcktions or format funcktions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also go to doc properties, number, and decide the format for each field, but I preffer to bring it already short to save some memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bring date fields as dates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 15:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367090#M704526</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2012-06-25T15:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367091#M704527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if I wanted to find out how old certain dates were?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, today is 06/25/2012. I want to find any dates between todays today and 60 days ago.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 17:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367091#M704527</guid>
      <dc:creator />
      <dc:date>2012-06-25T17:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date/timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367092#M704528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;if(LastLogonTime &amp;lt; today()-60, 'older than 60 days','within last 60 days') as LogOnClass,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 17:10:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-date-timestamp/m-p/367092#M704528</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-06-25T17:10:38Z</dc:date>
    </item>
  </channel>
</rss>

