Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Odd datetime field behaviour

Hi All,

In a script I got a datetime field which I cannot convert to date field. Strangly enough, I can make Year() and Month() out of it but when trying to make Date() or Date(Date#()) I arrive with datetime and nulls respectively. I thought it might have somehow be treated as a string but Left() brought me numeric date equivalent.

Any idea what is going on and how to fix it?

Regards,

Przemek

Tags (1)
2 Replies
MVP
MVP

Odd datetime field behaviour

If it's already a date field, then Date#() wouldn't work, but Date() should...

Try to understand exactly what is the format of the loaded data - show the field in the list box and play with the Number formatting. What happens if you select "mixed"? What happens when you select "Integer"? What happens if you select "Date" or "Timestamp"? This way, you'll see if the field was loaded as a number or a text, or a date.

Not applicable

Odd datetime field behaviour

Hi Oleg,

I've tested format and eventually reloaded it as it was in the beginning with just a Date() ... and it worked. Now don't know whether to be happy that I made it or sad because I've no idea how :-) Thank you, anyway.

Regards,

Przemek

Community Browser