Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date format when importing through ODBC

I am obtaining data via an ODBC connection from an Oracle database. I am a busiess user and the data is being called in from a view created by our IT department.

I am extracting the data in a qvd file and then using it for graphs. Those fields which are date format, Qlikview is not inheriting the format and values are coming unformatted like 35370, 36982, etc.

Is there any way of changing the format of the field in Qlikview.

Thanks.

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

That correct. QlikView will translate all date data into number format. To format into specific date field, you need to use Date() function when you load data or via expression.

For example:

1. Use in load script

     Date(DateField,'DD-MM-YYYY')     AS [MyDate],     //Ex. Date(35370,'DD-MM-YYYY') return 01-11-1996

2. Use expression

=Date(DateField,'DD-MM-YYYY')

Regards,

Sokkorn

View solution in original post

3 Replies
Not applicable
Author

changing the format of the field in Qlikview.

date(fieldname)

or

date(fieldname,'DD-MM-YYYY')

Sokkorn
Master
Master

Hi,

That correct. QlikView will translate all date data into number format. To format into specific date field, you need to use Date() function when you load data or via expression.

For example:

1. Use in load script

     Date(DateField,'DD-MM-YYYY')     AS [MyDate],     //Ex. Date(35370,'DD-MM-YYYY') return 01-11-1996

2. Use expression

=Date(DateField,'DD-MM-YYYY')

Regards,

Sokkorn

er_mohit
Master II
Master II

Try this

Date(Date#(Datefield,'DD-MM-YYYY'),'DD-MM-YYYY') as Date

the first format in date# function is your default format and 2nd one format is which you want either same or different like in below syntax

Date(Date#(Datefield,'DD-MM-YYYY'),'DD/MM/YYYY') as Date

hope it helps