Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_anywar
Creator
Creator

Date Function

Dear, i need help here.

I want to load my data that includes date and timestamps.

When I do it on cloud, its fine. but on my desktop app it refuses.

My field ts is a time stamp. On my Qlik Sense cloud, it loads,

However on the Destop it is shown as General, hence dates are shown as a string.

If I use the Date function as you can see below, it does not load at all. the table field ts is left blank/ null.

Help please.

[TaskActivities]:

LOAD

// [ts] AS [ts],

//    Date#(`ts`,'DD.MM.YYYY') as "ts",

    Date#(`ts`,'DD.MM.YYYY hh:mm:ss[.fff]') as "ts",

[fullName] AS [fullName],

[activityType] AS [activityType],

[taskType] AS [taskType],

[manufacturingOrderId] AS [manufacturingOrderId],

[productId] AS [productId],

[taskId] AS [taskId]

RESIDENT RestConnectorMasterTable;

Thank you.

14 Replies
OmarBenSalem

what happens when u do

timestamp(ts) as timestamp,

timestamp(num#(ts)) as timestamp2

michael_anywar
Creator
Creator
Author

Does not return any field.

michael_anywar
Creator
Creator
Author

Still none of the two has worked for me..on my data.

michael_anywar
Creator
Creator
Author

Something positive has popped up.

[TaskActivities]:

LOAD

  [ts] AS [ts],

    Text(timestamp(Timestamp# (ts,'YYYYMMDDhhmmss' ),'DD.MM.YYYY hh:mm:ss'))AS myTextTimestamp,


But now, not sure if i should format it to something or, what if i need to trim and get only date would that be possible..?

test time stamp.png

michael_anywar
Creator
Creator
Author

This is the what save me.

Timestamp(ConvertToLocalTime((25569 + Round([ts]/1000) / 86400),'GMT+02:00')) AS [ts],

Finals.png

See the column root.ts

LOAD

Timestamp(ConvertToLocalTime((25569 + Round([ts]/1000) / 86400),'GMT+02:00')) AS [ts],

[fullName] AS [fullName],

[activityType] AS [activityType],

[taskType] AS [taskType],

[manufacturingOrderId] AS [manufacturingOrderId],

[productId] AS [productId],

[taskId] AS [taskId]