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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date issue

Hi all.

I have two tables and one of them have a date field called "AnswerCreated" and the format for that field is "2014-02-04 19:42:22.130" and when I look at it in QV "41407,71546412".

I would like to use that field as a key to a Calendar but what is the best way to format that field?

See attached qvw.

10 Replies
Nicole-Smith

Settings > Document Properties > Number:

MK_QSL
MVP
MVP

Either use below in UI side

=Date(Date#(AnswerCreated,'YYYY-MM-DD hh:mm:ss'))

Or below in script side

Date(Date#(AnswerCreated,'YYYY-MM-DD hh:mm:ss')) as AnswerCreated

Not applicable
Author

Yes, I would like to do it in the script but that doesn't work. The field AnswerCreated is empty, doesn't you need to take care about the last three numbers?

sunilkumarqv
Specialist II
Specialist II

open the script

Please find the attached give feed back hope thio helps you

manojkulkarni
Partner - Specialist II
Partner - Specialist II

use

Date(AnswerCreated,'YYYY-MM-DD') AS Date...

ashwanin
Specialist
Specialist

use

Date(AnswerCreated,'DD-MMM-YYYY') As AnswerCreated

in the script.

er_mohit
Master II
Master II

Try this in text object

=Date(Date# ('2014-02-04 19:42:22.130','YYYY-MM-DD hh:mm:ss.fff'),'YYYY-MM-DD hh:mm:ss' )

sunilkumarqv
Specialist II
Specialist II

try this into your textobject not required that of script Mohit.

=Timestamp#(Now(),'DD/MM/YYY hh:mm:ss')

PrashantSangle

Hi,

try this

timestamp(timestamp#(AnswerCreated,'YYYY-MM-DD hh:mm:ss')) as AnswerCreated

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 🙂