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: 
Not applicable

how to remove timestamp from monthend function?

Hi all,

Please an some one help me out with the below issue??

In my script I have a row as below:

Monthend(Month)   as expiry_date,

the  expiry date resultant is presently as 31/1/2016 11:59:59 PM but I want to remove the time stamp from the same in the script level or make the timestamp 0,so that my out put comes after reloading as only 31/1/2016.How is this possible?? please can someone help me??

regards,

Sahana

11 Replies
nilo_pontes
Partner - Creator
Partner - Creator

Hi Sahana,

Try: Date(Floor(Month),'DD/MM/YYYY') As expiry_date.

Take a look at Primer for QlikView Date fields for more details.

Regards

Anonymous
Not applicable
Author

Hi,

Try below,

Date(Floor(MonthEnd(Month))) as Expiry_Date

SunilChauhan
Champion II
Champion II

Date(Monthend(Month))   as expiry_date,

Sunil Chauhan
jagan
Partner - Champion III
Partner - Champion III

Hi Sahana,

Try like this

Date(MonthEnd(Month))

or

Date(MonthEnd(Month), 'M/D/YYYY')

OR

Date(Floor(MonthEnd(Month)))

Regards,

Jagan.

Not applicable
Author

hi thanks a lot

how can I do the same foe today() function in chart level.

I tried this:expiry_date-Date(Floor(today()))) it works ,but when I do

(expiry_date-Date(Floor(today()))))/365 it doesn't work... the time stamp doesn't become 12:00:00am

Please can you help me??

SunilChauhan
Champion II
Champion II

Date(expiry_date)-Date(today())

Sunil Chauhan
SunilChauhan
Champion II
Champion II

or you can try

age(expiry_date,today())

Sunil Chauhan
tresesco
MVP
MVP

Today() returns an integer, so the floor() would not be required for it. Rather try like:

Floor(expiry_date) - today()

But again if you divide the returned integer by 365, you might not get an integer. I could not understand the logic of expecting output 12:00:00.

its_anandrjs
Champion III
Champion III

Try with

Date(Floor(Month),'DD/MM/YYYY') As expiry_date  // If you need the DD/MM/YYY formats