问题
I need to know the week of year of a timestamp using Derby/JavaDB. And to make it worse I have to extract it from a parameter not a column. Don't ask why but that should be a minor problem.
On DB2 I say someting like
VALUES WEEK_ISO(?)
But how do I get the same result with Derby aka JavaDB?
回答1:
Thanks Bryan, your Link was very helpful.
http://therealdanvega.com/blog/2010/02/17/creating-apache-derby-custom-functions-part-2
It seems there is no week function in derby but it is very easy to program such a function yourself. Especially when you use it from Java.
来源:https://stackoverflow.com/questions/32581936/week-of-year-of-a-timestamp-using-derby-javadb