

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Thanks for the reply. I got the answer for this.
To_number(To_Char("LAST_UPDATE_DATE",'YYYY'),'9999')
Regards,
Renuka S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
use to_char(date_field,'yyyy')
Regards,
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 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
in oracle there is year() too available.
so you can use like that in sql query
where year(datefield)>='2014';
Regards,
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 🙂


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try like this -
Year(date(floor(date_field), 'MM/DD/YYYY'))
Best Regards,
Neha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
where to_date(to_char(YourDateField,'YYYY'),'YYYY') >'2014'


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Thanks for the reply. I got the answer for this.
To_number(To_Char("LAST_UPDATE_DATE",'YYYY'),'9999')
Regards,
Renuka S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why 9999 at the end?
