Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

reading timestamps from a csv

I am trying to read a timestamp from a csv

blobname, unitblobname. ,blabla,N,Combustion Turbine,09/01/2009 5:00 PM,MV90 Hourly,0.0

I deifned the timestmap format as MM/DD/YYYY h:mm a, but when I run the Load script, the pivot chart I use to display the dates fails to show me values. This chart has calculated dimension base don the timestamp parameter such as year(timestamp), day(timestamp), month(timestamp)

Is there a better way to Load timestamp data from a csv file?

13 Replies
prieper
Master II
Master II

Please check Oleg's message: you also should please replace the 'a' with 'tt' in the timestamp-function

Peter

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

you missed one more correction - 'tt' instead of 'a'. Try this:

MeterData:
LOAD @1 as meterName,
@2 as unitName,
@3 as planName,
@4 as market,
@5 as fuelType,
timestamp#(@6,'MM/DD/YYYY h:mm tt') as beginDate,
@7 as editionName,
@8*-1 as Value
FROM
$(path)GEN_METER*.csv
(txt, codepage is 1252, no labels, delimiter is ',', msq, header is 1 lines);

Not applicable
Author

Thanks! replacing a with tt did the trick

Not applicable
Author

replacing a with tt did the trick.. Thanks!