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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
fatihsahin
Partner - Contributor
Partner - Contributor

Date function / Split

Hi.

How to split this into date and time:

2015-07-06 10:02:19.000 +0000

I do not need the ending 000 +0000

Regards

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

Date:

=Date(Floor(TimeStamp#(Left('2015-07-06 10:02:19.000 +0000', 19), 'YYYY-MM-DD hh:mm:ss')), 'YYYY-MM-DD')

Time:

=Time(Frac(TimeStamp#(Left('2015-07-06 10:02:19.000 +0000', 19), 'YYYY-MM-DD hh:mm:ss')), 'hh:mm:ss')

View solution in original post

4 Replies
giakoum
Partner - Master II
Partner - Master II

date or date#

time or time#

floor to get the date only (date & time stamps are numbers in QlikView)

etc.

sunny_talwar
MVP
MVP

Try this:

Date:

=Date(Floor(TimeStamp#(Left('2015-07-06 10:02:19.000 +0000', 19), 'YYYY-MM-DD hh:mm:ss')), 'YYYY-MM-DD')

Time:

=Time(Frac(TimeStamp#(Left('2015-07-06 10:02:19.000 +0000', 19), 'YYYY-MM-DD hh:mm:ss')), 'hh:mm:ss')

robert_mika
MVP
MVP

Another Way

TextBetween('2015-07-06 10:02:19.000 +0000','','.')

sasiparupudi1
Master III
Master III

SubField('2015-07-06 10:02:19.000 +0000','.',1)