Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to change datatype, the data gets loaded over
SQL Select
The datatype after the loading is $numeric 2023-08-31 12:46:01.000000, my desired datatype is a date format.
I tried different kind of approaches in the front end:
Date(num([My value], 'YYYY-dd-MM hh:mm:ss'), 'dd.MM.YYYY') as t1
(Timestamp#([My Value],'YYYY-dd-MM hh:mm:ss TT '),'dd.MM.YYYY') as t1
but nothing is working the data type only gets changed to $integer or to text ascii. Does anyone have an idea what I'm missing ?
Thanks for the repley if i use this line of code the data type is $text $ascii-...
how does that happen ?
Which mean this is date type you can validate it in frontend with table try to use month, year functions to double check whethe it is working or not.
Date# and Date are two different functions. Date# tells the systen that perticular column is date. And Date functions helps you to change the date format.
This has already been set in the database for one year. Now I just need the right script to get years greater than 2018 in the selection box
Yes i know but how can i be that after date and date# the data type is not as it should be...
the month function works on the output of Date(Date#(column_name, 'date_format'), 'your_required_format')
but i get the names in text like dec.
1. Qlik needs to identify, most of the time they don't recognize the date datatypes. Best practices we do date# function.
2. Try doing this by set analysis keep year >= "2018" [Note: this will not effect the value while using filter pane].
It is a dual() value - means a return-value of dec is just the string-representation of the real numeric value of 12. If you want to have also 12 as string-representation you could apply num(month(Field)).
that makes absolutly sense, but my goal is just to change the data type completly to $numeric $timestamp. How would i achieve that ?
Do try this - Date(Date#(Year(DateColumn), 'DD/MM/YYYY'), 'MM/DD/YYYY') as datecolumn