<?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 Time conversions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221564#M74374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's very difficult to read your script as posted. Can you repost as plain text?&lt;/P&gt;&lt;P&gt;1. In Settings -&amp;gt; User Preferences -&amp;gt; Editor tab, uncheck "Copy as RTF".&lt;BR /&gt;2. Post without the [ code ] tags.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jul 2010 21:41:52 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2010-07-13T21:41:52Z</dc:date>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221561#M74371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a datetime field Startime which is in GMT and has to be converted to PST ,&lt;/P&gt;&lt;P&gt;Here is my Load statement , how do i convert to PST in load statement ?&lt;/P&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;&lt;P&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;&lt;/P&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;&lt;P&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;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Load&lt;/P&gt;&lt;P&gt;starttime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;AS&lt;/B&gt; [Week #] &lt;P&gt;,&lt;/P&gt;&lt;P&gt;WeekStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;as&lt;/B&gt; Week &lt;P&gt;,&lt;/P&gt;&lt;P&gt;Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;AS&lt;/B&gt; Year &lt;P&gt;,&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;AS&lt;/B&gt; [Month #] &lt;P&gt;,&lt;/P&gt;&lt;P&gt;MonthStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;as&lt;/B&gt; Month &lt;P&gt;,&lt;/P&gt;&lt;P&gt;Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;AS&lt;/B&gt; [Day] &lt;P&gt;,&lt;/P&gt;&lt;P&gt;Weekday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;AS&lt;/B&gt; WeekDay &lt;P&gt;,&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(monthstart(starttime), 'MMM-YYYY') &lt;P&gt;&lt;B&gt;AS&lt;/B&gt;&lt;/P&gt;&lt;P&gt;MonthYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime)&amp;amp;'-'&amp;amp;Year(starttime) &lt;B&gt;AS&lt;/B&gt; WeekYear &lt;P&gt;,&lt;/P&gt;&lt;P&gt;hour&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(starttime) &lt;B&gt;as&lt;/B&gt; BuildHour &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 00:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221561#M74371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-13T00:16:03Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221562#M74372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;ConvertToLocalTime(starttime, "GMT-08:00")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 02:24:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221562#M74372</guid>
      <dc:creator />
      <dc:date>2010-07-13T02:24:23Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221563#M74373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting error saying coverttolocaltime is not recognizable&lt;/P&gt;&lt;P&gt;Here is my code could any one please let me know what is wrong ...&lt;/P&gt;&lt;P&gt;[ code ]&lt;/P&gt;&lt;P&gt;&lt;B&gt;Load&lt;/B&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WeekStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;MonthStart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Weekday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(monthstart(ConvertToLocalTime(starttime,"GMT-07:00")), 'MMM-YYYY') (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; WeekDay (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; [Day] (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;as&lt;/B&gt; Month (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; [Month #] (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; Year (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;as&lt;/B&gt; Week ,(ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; [Week #] ,,(starttime,"GMT-07:00") &lt;B&gt;as&lt;/B&gt; starttime ,&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;AS&lt;/B&gt;&lt;/P&gt;&lt;P&gt;MonthYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;hour&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;BuildSizeMB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;,BuildID ,Action,Duration,FileCount,ProductLine,Duration_Min ,UserName, JobName ;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQLsele&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date,BuildID,&lt;/P&gt;&lt;P&gt;((bytecount)/1024/1024)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; as 'BuildSizeMB',(DURATION/60)AS Duration_Min, &lt;P&gt;&lt;/P&gt;&lt;P&gt;Action,Duration,FileCount,ProductLine,SubmittedBy&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; as 'UserName',JobName &lt;B&gt;FROM&lt;/B&gt; &lt;P&gt;ASWTRANS.DBO.CRMBUILDMETRICS [ /code ]&lt;/P&gt;&lt;B&gt;ct&lt;/B&gt; starttime,CONVERT(VARCHAR(10), ConvertToLocalTime(starttime,"GMT-07:00"), 101) AS (ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;as&lt;/B&gt; BuildHour (ConvertToLocalTime(starttime,"GMT-07:00"))&amp;amp;'-'&amp;amp;Year(ConvertToLocalTime(starttime,"GMT-07:00")) &lt;B&gt;AS&lt;/B&gt; WeekYear &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 20:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221563#M74373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-13T20:39:20Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221564#M74374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's very difficult to read your script as posted. Can you repost as plain text?&lt;/P&gt;&lt;P&gt;1. In Settings -&amp;gt; User Preferences -&amp;gt; Editor tab, uncheck "Copy as RTF".&lt;BR /&gt;2. Post without the [ code ] tags.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 21:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221564#M74374</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-07-13T21:41:52Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221565#M74375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do i find Setting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 21:49:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221565#M74375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-13T21:49:47Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221566#M74376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the top of the QlikView screen. It's one of the menu items.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 00:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221566#M74376</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-14T00:17:44Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221567#M74377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script,I want to convert starttime to PDT which is in GMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;starttime,&lt;BR /&gt;Date,&lt;BR /&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS&lt;BR /&gt;MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,CONVERT(VARCHAR(10), starttime, 101) AS Date,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as 'BuildSizeMB',(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 00:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221567#M74377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T00:30:14Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221568#M74378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you just need "GMT-08:00" in single instead of double quotes, though since you aren't showing what you got the error on, I could easily be wrong. For that matter, it looks like you can very explicitly refer to pacific time. Perhaps like this:&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;;&lt;BR /&gt;Load&lt;BR /&gt;converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') as starttime&lt;BR /&gt;Date,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,CONVERT(VARCHAR(10), starttime, 101) AS Date,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as 'BuildSizeMB',(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 00:52:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221568#M74378</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-14T00:52:54Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221569#M74379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So , does 'Pacific Time (US &amp;amp; Canada)' consider day light savings too?&lt;/P&gt;&lt;P&gt;You are right , single quotes work...&lt;/P&gt;&lt;P&gt;converttolocaltime(starttime,'GMT-07:00') works without any errors, i have given 7 as this is day light saving period....&lt;/P&gt;&lt;P&gt;And also , do i have to change this wherever i had startime ? like for Month , Year,day convertions and also select statement ? Or qlikview automatically take the conversion if given in one load statement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 01:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221569#M74379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T01:17:06Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221570#M74380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the help text, "The resulting time is adjusted for daylight savings time, unless the third parameter is set to 1 or true()."&lt;/P&gt;&lt;P&gt;The way I rearranged your load, you don't have to do it anywhere else but that one spot. As I set it up, that happens first, THEN it takes a second pass, using your adjusted starttime as input for all the other functions. The approach is called a preceeding load. It has this basic structure:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD *&lt;BR /&gt;,these fields are loaded last, and can use any fields from the below two loads&lt;BR /&gt;;&lt;BR /&gt;LOAD *&lt;BR /&gt;,these fields are loaded second, and can use any fields from the below load&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt; these fields are loaded first&lt;BR /&gt;FROM my data source&lt;BR /&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 01:25:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221570#M74380</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-14T01:25:00Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221571#M74381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One note: conversion to Date must be done &lt;STRONG&gt;after&lt;/STRONG&gt; convertion from GMT to local time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 02:05:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221571#M74381</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T02:05:56Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221572#M74382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my current script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName,Date&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') as starttime,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName,Date&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,CONVERT(VARCHAR(10),starttime,101) AS Date,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as BuildSizeMB,(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;BR /&gt;&lt;BR /&gt; Do you think it should be something like below ? , But i get an syntax error saying converttolocaltime is not identfied, One basic question , how do the select statement work here , i got an idea of load statements loading , when does a select statement come into consideration ?before or after load statement?&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName,Date&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') as starttime,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName,Date&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,&lt;STRONG&gt;CONVERT(VARCHAR(10),converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') ,101)&lt;/STRONG&gt; AS Date,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as BuildSizeMB,(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 02:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221572#M74382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T02:25:57Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221573#M74383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;RAMYA_BEGINNER wrote:But i get an syntax error saying converttolocaltime is not identfied, One basic question , how do the select statement work here , i got an idea of load statements loading , when does a select statement come into consideration ?before or after load statement?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;ConvertToLocalTime is a QV function. It must be used in the LOAD statement, not in the SQL Select. Only valid SQL may be used in the SQL Select.&lt;/P&gt;&lt;P&gt;The SQL Select is executed first. The data returned by the SQL Select is "passed up" to the LOAD statement.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 05:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221573#M74383</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-07-14T05:17:31Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221574#M74384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed my Script to below , but i am getting all duplicate values for date, to avoid this i used convert function in select statement previously , as converttolocaltime cannot be used in sql statement and convert(which converts datetime value to date in 101 form) cannot be used in load statement i cannot understand how to go with this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way how do i attach a qlikview file to my post , i tried using insert media , did not work ...&lt;/P&gt;&lt;P&gt;Please Help..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;Date(starttime) as Date,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') as starttime,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as BuildSizeMB,(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 17:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221574#M74384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T17:47:48Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221575#M74385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Ramya,&lt;/P&gt;&lt;P&gt;you can use the floor function here.&lt;/P&gt;&lt;P&gt;Lets say for a give day, you have multiple timestamps.&lt;/P&gt;&lt;P&gt;then,&lt;/P&gt;&lt;P&gt;date(floor(timestamp#('&amp;lt;time_stamp&amp;gt;', 'FORMAT')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or try date(floor(date#('&amp;lt;time_stamp&amp;gt;', 'FORMAT')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here FORMAT is the format in which we get the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 18:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221575#M74385</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-07-14T18:31:47Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221576#M74386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both of them did not work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is my code, i dont get any error with below, even i dont get any data in the field Data&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Week(starttime) AS [Week #],&lt;BR /&gt;WeekStart(starttime) as Week,&lt;BR /&gt;Year(starttime) AS Year,&lt;BR /&gt;Month(starttime) AS [Month #],&lt;BR /&gt;MonthStart(starttime) as Month,&lt;BR /&gt;Day(starttime) AS [Day],&lt;BR /&gt;Weekday(starttime) AS WeekDay,&lt;BR /&gt;//Date(starttime) as Date,&lt;BR /&gt;Date(monthstart(starttime), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt;Week(starttime)&amp;amp;'-'&amp;amp;Year(starttime) AS WeekYear,&lt;BR /&gt;hour(starttime) as BuildHour,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName,&lt;BR /&gt;//date(floor(starttime('starttime', 'MM/DD/YYYY'))) as Date,&lt;BR /&gt;date(floor(date#('starttime', 'MM/DD/YYYY')))as Date&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;converttolocaltime(starttime,'Pacific Time (US &amp;amp; Canada)') as starttime,&lt;BR /&gt;BuildSizeMB,BuildID,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,Duration_Min,&lt;BR /&gt;UserName,JobName&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL select starttime,BuildID,&lt;BR /&gt;((bytecount)/1024/1024) as BuildSizeMB,(DURATION/60)AS Duration_Min,&lt;BR /&gt;Action,Duration,FileCount,ProductLine,SubmittedBy as 'UserName',JobName&lt;BR /&gt;FROM ASWTRANS.DBO.CRMBUILDMETRICS&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 19:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221576#M74386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T19:07:54Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221577#M74387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All looks correct excpet the "Date" field. It should be simply:&lt;BR /&gt;date(floor(starttime)) as Date&lt;BR /&gt;or, if you want to specify format explicitly:&lt;BR /&gt;date(floor(starttime), 'DD/MM/YY') as Date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 20:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221577#M74387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T20:06:42Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221578#M74388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works with the filter , but in current selection box, i see the time 12:00am , how do i avoid that...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 23:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221578#M74388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T23:18:03Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221579#M74389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to Document Properties, tab "Number", and make sure that field Date is Date, not Timestamp nor Time.&lt;BR /&gt;You can also do this in list box properties, but it will effect only this list box. It's better on document level.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 23:43:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221579#M74389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T23:43:09Z</dc:date>
    </item>
    <item>
      <title>Time conversions</title>
      <link>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221580#M74390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it, Thank you ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jul 2010 00:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-conversions/m-p/221580#M74390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-15T00:12:46Z</dc:date>
    </item>
  </channel>
</rss>

