Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
renuka_sasikumar
Creator III
Creator III

Conversion of Date into Year in Oracle.

Hi,

I would like to extract data from Oracle server where I have to filter data>='2014' & here the Date field is in Date Format.

i.e. DD/MM/YYYY HH:MM:SS

So how do I convert into Year.

I dont want to use Preceding load because it is taking tooo long time.

Anyone can.

Regards,

Renuka S

1 Solution

Accepted Solutions
renuka_sasikumar
Creator III
Creator III
Author

Hi All,

Thanks for the reply. I got the answer for this.

To_number(To_Char("LAST_UPDATE_DATE",'YYYY'),'9999')

Regards,

Renuka S

View solution in original post

7 Replies
PrashantSangle

hi,

use to_char(date_field,'yyyy')

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
prma7799
Master III
Master III

Please look this

TO_CHAR

TO_CHAR (datetime)

PrashantSangle

Hi,

in oracle there is year() too available.

so you can use like that in sql query

where year(datefield)>='2014';

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
nehasaxena
Creator II
Creator II

Try like this -

Year(date(floor(date_field), 'MM/DD/YYYY'))

Best Regards,

Neha

Kushal_Chawda

where to_date(to_char(YourDateField,'YYYY'),'YYYY') >'2014'

renuka_sasikumar
Creator III
Creator III
Author

Hi All,

Thanks for the reply. I got the answer for this.

To_number(To_Char("LAST_UPDATE_DATE",'YYYY'),'9999')

Regards,

Renuka S

matKa
Contributor III
Contributor III

Why 9999 at the end?