Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date(floor)

Hi,

trying to fetch the date out of my timestamp field (SettlementTime) but it does not work for some reason, getting null values.

Date( Floor( Timestamp#(SettlementTime, 'DD/MM/YYYY hh:mm:ss')), 'DD/MM/YYYY')as SettlementDate

Timestamp (SettlementTime) format from my source data looks like below:

09/02/2015  10:30:44

Thanks in advance,

Olle


1 Solution

Accepted Solutions
PrashantSangle

Hi,

Use

Subfield(SettlementTime,' ',1) as date

or

use date(floor(SettlementTime),'DD/MM/YYYY') as New_date

REgards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

4 Replies
PrashantSangle

Hi,

Use

Subfield(SettlementTime,' ',1) as date

or

use date(floor(SettlementTime),'DD/MM/YYYY') as New_date

REgards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
maxgro
MVP
MVP

I think you need 2 space between Y and h (because there are 2 spaces here 09/02/2015  10:30:44)

date(floor(Timestamp#('09/02/2015  10:30:44', 'DD/MM/YYYY  hh:mm:ss')))

Not applicable
Author

Hi Olle,

if your underlying data is already in a proper date number format, you shouldn't need to explicitly timestamp like that, should just be able to floor and date the field.

Date( Floor(SettlementTime), 'DD/MM/YYYY') as SettlementDate

Hope that helps

Joe

Anonymous
Not applicable
Author

Hi,

Please give space before 'as' keyword:

Date( Floor( Timestamp#(SettlementTime, 'DD/MM/YYYY hh:mm:ss')), 'DD/MM/YYYY') as SettlementDate;

or

Date( Floor( SettlementTime),'DD/MM/YYYY') as SettlementDate ;

Regards

Neetha