Week of year of a timestamp using derby/JavaDB

僤鯓⒐⒋嵵緔 提交于 2019-12-13 05:46:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!