Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ValeriaBonini
Partner - Creator
Partner - Creator

date format

Hi, in my script I have this select:

SELECT
sum(mt.movementqty) as stock,
FROM m_transaction mt
WHERE mt.ad_client_id = 1000003
and mt.movementdate<='2021-12-31'
GROUP BY mt.ad_client_id, mt.movementdate
having sum(mt.movementqty)<>0;

the field mt.movementdate is in a format like 'yyyy-mm-dd hh-mm-ss', how can i make it in a format like 'dd-mm-yyyy'??

Labels (3)
2 Replies
Or
MVP
MVP

This isn't Qlik code, it's an SQL statement. It might differ depending on the type of database. Have a look at e.g. https://www.w3schools.com/sql/func_sqlserver_convert.asp

 

At the Qlik level, you can use Date(YourField,'DD-MM-YYYY') to format, but that's in a load script.

ValeriaBonini
Partner - Creator
Partner - Creator
Author

can I ask you how to convert in SQL in my script? i can't understand the function on w3school