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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How Can I Show a Date with

Hi guys!

I´m new, my name is John or Juan (as you like!) from Buenos Aires, Argentina. Excuse me but i have a bad english. i am interested in learn how i can show in differents tables dates i have recharged from an excel file. I want to make something like this

DATE

31 / 01 / 1987

04 / 12 / 2009

04 / 11 / 2009

YEAR

1987

2009

2009

MONTH

01

12

11

DAY

31

04

04

CAN YOU HELP ME?



Labels (1)
6 Replies
prasad
Contributor III
Contributor III

Hi,

While loading date field, load as year(date field), month(date field), and day(date field).

after loading go the sheet where you want to display, select the year,month and day which can be displayed with the dimension you selected.

Prasad

Not applicable
Author

Thanks for this question but i have an error but i dont know where, can you help me?

ODBC CONNECT TO [Excel Files;DBQ=C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07.xls];
SQL SELECT `date`,
FROM `C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07`.`'CE-Acum07$'`;

LOAD
DAY ('date'),
MONTH ('date'),
YEAR ('date'),
FROM `C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07`.`'CE-Acum07$'`;

thanks!!

Not applicable
Author

try this one ;


ODBC CONNECT TO [Excel Files;DBQ=C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07.xls];
SQL SELECT `date`,
FROM `C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07`.`'CE-Acum07$'`;

LOAD
DAY ('date'),
MONTH ('date'),
YEAR ('date')
FROM `C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07`.`'CE-Acum07$'`;


Your were getting an error because you were using comma end of your line in your query.

YEAR ('date'),


best regards,

Önder



Anonymous
Not applicable
Author

Hi,

You won't need the ODBC connection string or the whole SQL load in order to load an Excel file. This should be enough:

LOAD
DAY (date) as Day,
MONTH (date) as Month,
YEAR (date) as Year
FROM C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07.xls (biff, embedded labels, table is CE-Acum07$);

This is if the field is named "date" in the Excel file. The easiest approach would be to use the button in the script editor called Table Files and just click your way to the Excel file and the load wizard will take you through creating the load statement.

Not applicable
Author

Excuse me, but i tried this and QV show me this

error in expresion: ')' expected

i have this script

SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='$ #.##0,00;$-#.##0,00';
SET TimeFormat='hh:mm:ss TT';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff] TT';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';
SET DayNames='lun;mar;mié;jue;vie;sáb;dom';

LOAD
DAY (comision desde) as Day,
MONTH (comision desde) as Month,
YEAR (comision desde) as Year
FROM C:\Users\Pavilion\Desktop\Marcelo Ozan\T-CE-ACUM TOTAL AGO 07.xls (biff, embedded labels, table is CE-Acum07$);

Embarrassed

Anonymous
Not applicable
Author

Did you use the "Table File.." button to bring up the wizard? In this case I would think no because it looks like the problem is the name of the field, comision desde.

This should be enclosed with brackets, [comision desde]. Day ([comision desde]) as Day, etc.

When using the wizard it should encapsulate these by default.