Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date conversion is not working

Hi all

i am taking timedate from oracle database

which is in the format as MMM DD YYYY hh:mmTT

for taking count i converted this in qv script like

Date(Floor(Date#(timedate,'MMM DD YYYY hh:mmTT')),'DD/MM/YYYY') as Date

but with this i am getting only few dates

some thing like for 1/15/2016 we have 4 dates in oracle db

but in qlikview it is showing only two

what might be the reason

please help me

regards,

Mahesh

1 Solution

Accepted Solutions
Michiel_QV_Fan
Specialist
Specialist

Maybe not the best solution, more a work around:

date(date#(subfield(oracle_field, chr(32), -1)&subfield(oracle_field, chr(32), 2)&subfield(oracle_field, chr(32), 3), 'YYYYMMMDD'), 'DD/MM/YYYY')

Link this to a master calendar to work with distinct values.

View solution in original post

13 Replies
sunny_talwar

Are you seeing null at other places? or the rows are not making into QlikView at all?

swuehl
MVP
MVP

What's the type in the Oracle DB? If it's DATE, have you just tried

Date(Floor(timedate),'DD/MM/YYYY') as Date

Anonymous
Not applicable
Author

it is showing timedate without any value

Anonymous
Not applicable
Author

the rows are not making into qlikview

sunny_talwar

Can you share your script where it is doing this?

PradeepReddy
Specialist II
Specialist II

try some thing like this...

Date(timestamp#(timedate,'MMM DD YYYY hh:mmTT'),'DD/MM/YYYY') as Date

Not applicable
Author

What does it show, if you just load it without any formatting?

prasadcm
Creator II
Creator II

Hi,

I am facing same problem.

I am taking field from oracle database which is in below format

Tue Dec 08 14:02:05 GMT 2015 & datatype is VARCHAR2(30 BYTE).

How can i convert it in DD/MMM/YYYY format?

Michiel_QV_Fan
Specialist
Specialist

Maybe not the best solution, more a work around:

date(date#(subfield(oracle_field, chr(32), -1)&subfield(oracle_field, chr(32), 2)&subfield(oracle_field, chr(32), 3), 'YYYYMMMDD'), 'DD/MM/YYYY')

Link this to a master calendar to work with distinct values.