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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Date Problem

Hello,

I have two information sources (xls and csv).

I need to concatenate both tables. (xls come in format DD-MM-YYYY. csv in DD/MM/YYYY

I tried this but doesn't work:

Date(Date#(Left(FECHAYHORA, 10), 'DD/MM/YYYY hh:mm:ss'),'DD-MM-YYYY') as Id_date

FECHAYHORA is in csv...


Thanks!

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Date(Floor([FECHA Y HORA]), 'DD-MM-YYYY') as Id_date

View solution in original post

11 Replies
Not applicable

Date(Date#(FECHAYHORA, 'DD/MM/YYYY hh:mm:ss'),'DD-MM-YYYY') as Id_date

sunny_talwar

or this:

Date(Date#(Left(FECHAYHORA, 10), 'DD/MM/YYYY'),'DD-MM-YYYY') as Id_date

maxgro
MVP
MVP

if you peek the first (with the left function) 10 char from FECHAYHORA

Date(Date#(Left(FECHAYHORA, 10), 'DD/MM/YYYY hh:mm:ss'),'DD-MM-YYYY') as Id_date


I think you should interpret (Date#) the first 10 char

Date(Date#(Left(FECHAYHORA, 10), 'DD/MM/YYYY'),'DD-MM-YYYY') as Id_date


or don't use left

Date(Date#(FECHAYHORA, 'DD/MM/YYYY hh:mm:ss'),'DD-MM-YYYY') as Id_date

pgalvezt
Specialist
Specialist
Author

Hello,

Thank you for your reply. I tried all posibilities I think. But Doesn't work. I put An Example...

Thanks!

sunny_talwar

May be this:

Date(Floor([FECHA Y HORA]), 'DD-MM-YYYY') as Id_date

sunny_talwar

There is no data within FECHAYHORA

Capture.PNG

ecolomer
Master II
Master II

Try this:

makedate(mid(FECHAYHORA, 7, 4), mid(FECHAYHORA, 4,2), left(FECHAYHORA, 2), 'DD/MM/YYYY')  as Fecha_New

pgalvezt
Specialist
Specialist
Author

Thank you Sunny!

pgalvezt
Specialist
Specialist
Author

Hi, Sunny, I just i realized that :

Date(Floor([FECHA Y HORA]), 'DD-MM-YYYY') as Id_date .... delete the format hh:mm:ss... Actually that information i need it because I do Intervales of time in my chart. How can I show the time too, with your formula?


for example 01-01-2016 00:00:00


Before was: 01-01-2016 01:35:25


Thanks!