I was trying to write the my own timestampdiff(DAY, first_date ,second_date) function which will work same as MySql tumestampdiff function.
But i am unable to under stand what would be data type of first argument so that it can accept key work word day , month or year.
Need expert comment as what kind of data type is this in function argument?
Secondly where can i see the mysql inbuilt functions implementation.
ok To add more clarity:
I have a query select * from application a where timestampdiff(DAY,a.created_date, CURRENT_TIMESTAMP(3)) >= 30;
i want above query should run in both oracle and mysql.
Hope u got my point. I thought of writing same function in oracle so that i don't have to do any code change and it will be supported for both database.
Now in above i am unable to figure if i am going to write the function the what should be first parameter type.
Thanks