What I'm trying to do is automatically change the output format of dates in my sql queries without having to specify it (PHP/Oracle).
I'm using to_char(pi.date_of_birth , 'YYYY/MM/DD') as date_of_birth
to change the formatting of my queries. What I'd like to be able to do is apply this to any date returned by the '*'
operator.
My problem is that I can't write all of my queries by hand, most of them are generated dynamically, and it would be much easier to change the format globally some way.
Now the problem I also have is that I have 'zero' control over the database. So I can't go in and change anything, or add any procedures. Is there some syntax I can append to my queries, or a simple way of integrating it into php? Thanks.