Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ismasani
Contributor
Contributor

Splitting Date String into Time and Date Fields

I  have a date string in excel field that I currently have labeled as "date WHEN STATUS WAS CHANGED" and looks like this:

09- AUG-2019  9:01:00 AM

How will I be able to split this date string into two fields:

09/08/2019 as "Date stamp"

9:01:00 AM as "Time Stamp"

 

 

6 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

maybe something like this

LOAD
Date(Date#(test,'DD-MMM-YYYY hh:mm:ss TT'),'DD/MM/YYYY') as date,
Time(Date#(test,'DD-MMM-YYYY hh:mm:ss TT'),'hh:mm:ss TT') as time
;
LOAD * INLINE [
test
09-AUG-2019 9:01:00 AM
];

tresesco
MVP
MVP

Try like:

 

Load
	Date(Floor(Timestamp#(DateTime, 'DD-MMM-YYYY hh:mm:ss TT')), 'DD/MM/YYYY') as Date,
	Time(Frac(Timestamp#(DateTime, 'DD-MMM-YYYY hh:mm:ss TT'))) as Time
	;
Load * Inline [
DateTime
09-AUG-2019 9:01:00 AM]

 

Brett_Bleess
Former Employee
Former Employee

Ismaila, do not forget to return to the thread and use the Accept as Solution button on any posts that helped you solve your issue, as this gives credit to the poster and lets others know what worked for your issue.  In addition to the two posts, I am going to give you a base URL to the Design Blog area, this area has hundreds of how-to posts that will likely come in very handy...

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
ismasani
Contributor
Contributor
Author

I tried this but it didn't work 

ismasani
Contributor
Contributor
Author

I tried this but it didn't work

Brett_Bleess
Former Employee
Former Employee

It will likely help if you attach a sample file the folks can check to see what the actual syntax of things is in that file...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.