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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dolly123
Creator II
Creator II

date formats

Qlikhub_0-1681963663725.png

we have to seperate date and time , time in different columns.

how we can use it ?

2 Solutions

Accepted Solutions
Hania
Creator
Creator

Hello @Dolly123 ,

You can try below expression in your script,

Date(Timestamp#(Field-Name,'Date_Time_Formate '),'Date_Formate_Required'),

Time(Timestamp#(Field-Name,'Date_Time_Formate '),'Time_Formate_Required')  

Here I did it on your sample Data as:

After loading your  field, you can create required field using resident load.

load
Date(Timestamp#([lastConvesationTim.e.],'DD-MM-YYYYhh:mm'),'DD/MM/YYYY') as Date,
Time(Timestamp#([lastConvesationTim.e.],'DD-MM-YYYYhh:mm'),'hh:mm') as Time
Resident Table_Name;

Hania_0-1681968824187.png

 

Hope this helps,

help user find answers ! don't forget to mark  a solution that work for you and click the like button!

 

View solution in original post

PrashantSangle

It is because you have space between date & Time. like

'01-01-2023 08:11' this is 'DD-MM-YYYY hh:mm' format

change expression accordingly

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

3 Replies
PrashantSangle

use date() for it

date(fieldName) as date

Time(fieldName) as time

 

check all options over here

https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hania
Creator
Creator

Hello @Dolly123 ,

You can try below expression in your script,

Date(Timestamp#(Field-Name,'Date_Time_Formate '),'Date_Formate_Required'),

Time(Timestamp#(Field-Name,'Date_Time_Formate '),'Time_Formate_Required')  

Here I did it on your sample Data as:

After loading your  field, you can create required field using resident load.

load
Date(Timestamp#([lastConvesationTim.e.],'DD-MM-YYYYhh:mm'),'DD/MM/YYYY') as Date,
Time(Timestamp#([lastConvesationTim.e.],'DD-MM-YYYYhh:mm'),'hh:mm') as Time
Resident Table_Name;

Hania_0-1681968824187.png

 

Hope this helps,

help user find answers ! don't forget to mark  a solution that work for you and click the like button!

 

PrashantSangle

It is because you have space between date & Time. like

'01-01-2023 08:11' this is 'DD-MM-YYYY hh:mm' format

change expression accordingly

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂