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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dateformat

Hi,

Am having date format as attached in the file. I want it to be converted into yyyy-mm-dd HH.MM.SS format.

Regards,

Tejavardhan

19 Replies
sushil353
Master II
Master II

inline load is for testing purpose you can directly use your date field..

Let me know your table structure

Not applicable
Author

Hi,

  Please Find The Attached Sample File, Definitely it will helpful for You.

Thanks & Regards,

K.J.Nirmal Raj.

Not applicable
Author

Hi nirmal,

Am using personnel edition i cant open the file that you have sent.

Regards,

Tejavardhan

er_mohit
Master II
Master II

try this

here F1=Fri Nov 30 23:01:22 +0000 2012

in script

date( date#(

subfield(F1,' ',2)

  &'-'& keepchar(subfield(F1,' ',3),'0123456789')

&'-'& keepchar(subfield(F1,' ',6),'0123456789')

&'-'& subfield(F1,' ',4)

,'MMM-DD-YYYY-hh:mm:ss') ,'YYYY-MM-DD hh:mm:ss')

as NEWDATEFIELD1

Not applicable
Author

Hi teja,

 

Test:

LOAD Date,
     KeepChar(left(mid(Date,5),3),Date) as Month,
     mid(Date,Index(Date,' ',3)-2,2) as Date1,
     mid(Date,Index(Date,' ',5)-14,9) as Time,
     mid(Date,Index(Date,' ',5),5) as Year,
     Sales
FROM
G:\Test1.xlsx
(ooxml, embedded labels, table is Sheet1);

Test2:

Load *,
Date1&'/'&Month&'/'&trim(Year)&' '&(Time) as Timestamp
Resident Test;
DROP Table Test;

PFA of Result Snapshot.

sushil353
Master II
Master II

Hi this is not in date format... it is returning as string

Not applicable
Author

Hi,

Its working well with six records that we put in inline function. The column name of dat is created_at if we put as

tab1:

load * inline

[

created_at

];

and then the code u mentioned its throwing error.

Regards,

Tejavardhan

Not applicable
Author

Hi teja,

Is this Working Properly,

Regards,

Nirmal.

Not applicable
Author

hi nirmal,

yeah its working well. thanks

Regards,

tejavardhan.

Not applicable
Author

Its ok teja