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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ConvertToLocalTime() and year(),month(),day()

Hi folks,

I've got a problem concerning the ConvertToLocalTime() function in combination with the functions year(), month() and day(). The converted datetime field is correct and will yield the correct year, month and day, if I use the functions directly on the sheet. However, if I want to write them as fields into a table in the script, I get a weird format (for example, the year 2011 will be written as 03.07.1905 02:00:00). I tried several different approaches to solve the problem (various conversions and modifications in different combinations), but it didn't work out.

Does anybody know the problem and maybe have a solution? Every advice is highly appreciated.

Thanks everybody!

Christian

1 Reply
swuehl
Champion III
Champion III

Could you post your script here (or the relevant part where you try to convert the datetime field)? Also your standard format settings and some example field values as read from your database might be useful.