Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
My_Rebecca
Creator
Creator

Text to Date

There is a text "20230301 07:30:00". How to design expression to turn it to date and time format? 

Labels (2)
1 Solution

Accepted Solutions
BrunPierre
Master
Master

Time(Frac(Timestamp#("Goods Arrival", 'YYYYMMDD hh:mm:ss')), 'h') AS GR_Hour

View solution in original post

9 Replies
vikasmahajan

Hi,

you can use Date#() function :

https://ezdatamunch.com/use-simple-date-functions-qlikview-qliksense/

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
PrashantSangle

Hi,

 

try

Timestamp(Timestamp#('20230301 07:30:00','YYYYMMDD hh:mm:ss'))

 

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 , 

you can try this,

Date(Timestamp#('20230301 07:30:00','YYYYMMDD hh:mm:ss'),'YYYY/MM/DD hh:mm:ss')

Hania_0-1681901815082.png

You can give format as you want .eg: 

Hania_1-1681901910642.png

Hope this helps,

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

 

My_Rebecca
Creator
Creator
Author

@Hania @PrashantSangle @vikasmahajan 

Dear all, please help to kook at my scrip, anything wrong?

hour(DATE(Timestamp#("Goods Arrival",'YYYYMMDD HH:MM:SS'),'YYYY-MM-DD H:MM:SS')) as GR_Hour

My_Rebecca_0-1681954038244.png

 

BrunPierre
Master
Master

Time(Frac(Timestamp#("Goods Arrival", 'YYYYMMDD hh:mm:ss')), 'h') AS GR_Hour

PrashantSangle

Hi,

 

try below 

Hour(Timestamp#("Goods Arrival",'YYYYMMDD hh:mm:ss'))

 

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 🙂
My_Rebecca
Creator
Creator
Author

dear @BrunPierre , what's the meaning of "Frac"? thanks.

BrunPierre
Master
Master

Frac() is used to remove the integer part of a number that only contains time information.

My_Rebecca
Creator
Creator
Author

thanks.