Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dastan
Contributor
Contributor

Separate date and time stamp

Hi guys,

My data is exactly as mentioned below. And I am trying to separate the date and time on Qlik Sense but unable to do it. Can someone help me. I tried DayName function, also tried Date and Date# but does not gives proper results. The below column has around 1200 line items. Kindly assist. Thank you.

Date/Time Closed
6/13/2023, 4:46 PM
6/14/2023, 9:01 AM
6/14/2023, 9:28 AM
6/13/2023, 3:56 PM
6/21/2023, 9:46 AM
6/22/2023, 10:19 AM
7/6/2023, 9:27 AM
7/6/2023, 5:29 PM
7/7/2023, 10:53 AM
6/16/2023, 1:17 PM
6/15/2023, 3:05 PM
6/15/2023, 1:04 PM
6/20/2023, 12:58 PM
6/15/2023, 3:04 PM
6/16/2023, 2:31 PM
6/16/2023, 1:18 PM
6/22/2023, 11:40 AM
3 Replies
vinieme12
Champion III
Champion III

as below

Load timestamp(timestamp#(DateTimeClosed,'MM/DD/YYYY, hh:mm TT')) as DateTimeClosed
,Date(floor(timestamp#(DateTimeClosed,'MM/DD/YYYY, hh:mm TT'))) as Date_part
,time(frac(timestamp#(DateTimeClosed,'MM/DD/YYYY, hh:mm TT'))) as time_part

inline [
DateTimeClosed
"6/13/2023, 4:46 PM"
"6/14/2023, 9:01 AM"
"6/14/2023, 9:28 AM"
"6/13/2023, 3:56 PM"
"6/21/2023, 9:46 AM"
"6/22/2023, 10:19 AM"
"7/6/2023, 9:27 AM"
"7/6/2023, 5:29 PM"
"7/7/2023, 10:53 AM"
"6/16/2023, 1:17 PM"
"6/15/2023, 3:05 PM"
"6/15/2023, 1:04 PM"
"6/20/2023, 12:58 PM"
"6/15/2023, 3:04 PM"
"6/16/2023, 2:31 PM"
"6/16/2023, 1:18 PM"
"6/22/2023, 11:40 AM"
];
exit Script;

vinieme12_0-1690856912342.png

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
pallavi_96
Partner - Creator
Partner - Creator

In order to split the date and time from the same field, you can use the subfield function.
e.g. For Date :- =subfield([Date/Time Closed],',',1)
For Time :- =subfield([Date/Time Closed],',',2)
dastan
Contributor
Contributor
Author

Its separating date and time  but giving only 1 value per date. For example if 5/4/2023 has 10 line items, above expression is only pulling up 1 value for the date 5/4/2023 and doing the same with other dates.