使用derby / JavaDB的时间戳的一周中的一周 [英] Week of year of a timestamp using derby/JavaDB
本文介绍了使用derby / JavaDB的时间戳的一周中的一周的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要了解使用Derby / JavaDB的一年中的时间戳。更糟糕的是,我必须从参数而不是列中提取它。不要问为什么,但是那应该是一个小问题。
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.
在DB2上,我说类似
VALUES WEEK_ISO(?)
但是我如何得到相同的结果
But how do I get the same result with Derby aka JavaDB?
推荐答案
感谢Bryan,您的链接非常有帮助。
Thanks Bryan, your Link was very helpful.
http:// therealdanvega .com / blog / 2010/02/17 / creating-apache-derby-custom-functions-part-2
似乎没有周功能在derby中,但是您自己编写此类功能非常容易。尤其是当您从Java使用它时。
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.
这篇关于使用derby / JavaDB的时间戳的一周中的一周的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文