<?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: To Split Time and Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540724#M599454</link>
    <description>&lt;P&gt;try like this:&lt;/P&gt;&lt;PRE&gt;Load *, Year(left(replace(publish_time,'T',' '),19)) as Year,
	Month(left(replace(publish_time,'T',' '),19)) as Month,
	WeekDay(left(replace(publish_time,'T',' '),19)) as Dayname,
	Time(left(replace(publish_time,'T',' '),19)) as Time,
	'Q' &amp;amp; Ceil(Month(left(replace(publish_time,'T',' '),19))/3) AS CalendarQuarter;

LOAD * INLINE [
    publish_time
    2017-11-10T07:38:29.00Z
];&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Feb 2019 09:38:07 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2019-02-07T09:38:07Z</dc:date>
    <item>
      <title>To Split Time and Date</title>
      <link>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540694#M599452</link>
      <description>&lt;P&gt;The data set I have,&amp;nbsp;looks at analyzing the publish time and date for popular videos.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data set looks like this and how best can I write my script to obtain the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Year&lt;BR /&gt;2. Month&lt;BR /&gt;3. Day of the week (will I need a separate set of info for this as I only have 'day' available)&amp;nbsp;&lt;BR /&gt;4. Time of Day (morning, afternoon, night)&amp;nbsp;&lt;BR /&gt;5. To classify them in 4 quarters of the year&amp;nbsp;&lt;/P&gt;&lt;P&gt;The eventual outcome I would like to have is to analyze peak and shoulder: quarters &amp;gt; months &amp;gt; day &amp;gt; time, to analyze the data and do a drill down to translate this into more meaningful and actionable steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="publish_time.PNG" style="width: 170px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5387iE84CA185411D9D64/image-size/large?v=v2&amp;amp;px=999" role="button" title="publish_time.PNG" alt="publish_time.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540694#M599452</guid>
      <dc:creator>Jojo17</dc:creator>
      <dc:date>2024-11-16T21:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: To Split Time and Date</title>
      <link>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540716#M599453</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATE#(left(publish_time,10),'YYYY-MM-DD') AS Publish_date&lt;/P&gt;&lt;P&gt;this will give you the date, use this in master calender to get all the related value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;time#(mid(publish_time,12,19),'hh:mm:ss')&amp;nbsp; as publish_time&lt;/P&gt;&lt;P&gt;this will give you time. use this to convert it to the time of the day according to your classification of morning evening and night.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 09:20:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540716#M599453</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-07T09:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: To Split Time and Date</title>
      <link>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540724#M599454</link>
      <description>&lt;P&gt;try like this:&lt;/P&gt;&lt;PRE&gt;Load *, Year(left(replace(publish_time,'T',' '),19)) as Year,
	Month(left(replace(publish_time,'T',' '),19)) as Month,
	WeekDay(left(replace(publish_time,'T',' '),19)) as Dayname,
	Time(left(replace(publish_time,'T',' '),19)) as Time,
	'Q' &amp;amp; Ceil(Month(left(replace(publish_time,'T',' '),19))/3) AS CalendarQuarter;

LOAD * INLINE [
    publish_time
    2017-11-10T07:38:29.00Z
];&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Feb 2019 09:38:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540724#M599454</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-02-07T09:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: To Split Time and Date</title>
      <link>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540864#M599455</link>
      <description>&lt;P&gt;You do not need to manipulate the timestamp. QlikView will handle the format correctly so there is no need of trimming away the 'T' or '000Z'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;TmpTimeOfDay:
LOAD  dual(ToD,Start -1+ IterNo()) as TimeOfDay Inline [
	Start, End, ToD
	0,5, Night
	6,11, Morning
	12,20, Afternoon
	20,23, Night
]
while Start -1 + IterNo() &amp;lt;= End
;
LOAD 
	Timestamp(publish_time) as Publishtime,
	year(publish_time) as Year,
	Month(publish_time) as Month,
	WeekDay(publish_time) as DayOfWeek,
	num(Hour(publish_time) ) as TimeOfDay,
	QuarterName(publish_time) as QuarterName,
	'Q' &amp;amp; Ceil(Month(publish_time)/3) AS [Quarter]

INLINE [
	publish_time
	2019-01-06T07:38:29.000Z
	2019-01-06T07:28:54.000Z
	2019-01-05T01:00:22.000Z
	2019-07-03T14:18:54.000Z
	2019-01-03T17:28:54.000Z
	]
;
Drop table TmpTimeOfDay&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 638px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5424i3E5E46CD4B182884/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 12:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-Split-Time-and-Date/m-p/1540864#M599455</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-02-07T12:16:28Z</dc:date>
    </item>
  </channel>
</rss>

