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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add second in date

Hello,

I want add a second in a date time like SQL function:

DateAdd(second, -1, u.dat1erdepot) And DateAdd(second, 1, u.dat1erdepot)

you have an idea because in Qlikview I see addmonth and addYear but not addsecond.

Thank you [:)]

1 Solution

Accepted Solutions
Not applicable
Author

Datetime should work the same. A date is just a whole number (today is 40303). A datetime is the same number, but includes decimal place for the time (right now is 40303.424....). Either way, it will add 1/86400 of a day, which is one second.

View solution in original post

4 Replies
Not applicable
Author

I believe there is no function because QlikView allows simple math on dates. Date + 1 adds one day to the date. If the day is a whole number, then adding a second means adding the proper fraction of one day. One second is 1/86400 days. Therefore:

Date + (1/86400)
Should add one second to your date.

Not applicable
Author

Thank you and if is a date time?

Not applicable
Author

Datetime should work the same. A date is just a whole number (today is 40303). A datetime is the same number, but includes decimal place for the time (right now is 40303.424....). Either way, it will add 1/86400 of a day, which is one second.

Not applicable
Author

Thank you very much 🙂

I have another problem I have post a new topic you can help me too ? it's LOAD and RESIDENT 🙂