0

hi all. below is my code. what i want is the financial_year_end to return only year instead of yyyy-mm-dd format. can anyone show me how can i do that? many thanks in return :)

SELECT a.stock_code, a.financial_year_end, current_name, board_name, sector_name, sub_sector_name, e.year_id, (receivable*365/revenue) AS "totaldso"
FROM qiddb.company_info a
LEFT JOIN ref_board b ON (b.board_code=a.board_code)
LEFT JOIN ref_sector c ON (c.sector_code=a.sector_code)
LEFT JOIN ref_sub_sector d ON (d.sub_sector_code=a.sub_sector_code)
LEFT JOIN company_financial e ON(e.stock_code=a.stock_code)
WHERE b.board_code='am' AND e.year_id = '2009'
2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by violette
0

i've found easier solution to get ,year or month from a date.

SELECT YEAR(financial_year_end)
FROM company_info

with this code, it will return only year of the date.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.