Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Order By date not working

I tried order by date and it's not working is there any other way to sort that column.

Eg.

LOAD Name,Address,Birthday

Resident Details

Order By Name,Birthday desc;

I want the table to load the latest date data first.

Birthday format is in  DD/MM/YYYY

Thank you.

Tags (2)
5 Replies

Re: Order By date not working

Try this

LOAD Name,Address,Birthday

Resident Details

Order By Name,Num(Birthday) desc;

MVP
MVP

Re: Order By date not working

LOAD Name,Address,Date(Birthday) as Birthday

Resident Details

Order By Name,Date(Birthday) desc;

Re: Order By date not working

Hi

at first please check that your DateFormat is set correctly in your load script.

In our case it should be:

SET DateFormat='DD/MM/YYYY';

Otherwise try:

LOAD Name,Address,Date#(Birthday, 'DD/MM/YYYY') as Birthday

Resident Details

Order By Name,Date#(Birthday, 'DD/MM/YYYY') desc;

regards

Marco

MVP
MVP

Re: Order By date not working

Hi,

I think you need to format the date like this before ordering, currently your date field is considering as string.

Eg.

LOAD Name,

Address,

Date(Date#(Birthday, 'DD/MM/YYYY')) AS Birthday

Resident Details

Order By Name, Date#(Birthday, 'DD/MM/YYYY') desc;

Regards,

Jagan.

martinpohl
Valued Contributor II

Re: Order By date not working

is it right to order by name, birthday?

This means each name has different birthday which need to be ordered.

Regards

Community Browser