我想使用jsp在html表单上显示来自oracle数据库的日期计算 [英] i want to display date calculation from oracle database on html form using jsp
本文介绍了我想使用jsp在html表单上显示来自oracle数据库的日期计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I want to display date calculation from oracle database on html form using jsp.
I have expiry date and current date columns with date datatype in return table and want to show fine if current date is greater than expiry date using total days * 2 with date format 08-jul-15(dd-mon-yy) on html form using preparedStatement.
Or can we use javascript (dd-mon-yy) to do this, and how?
推荐答案
你需要在5个简单的更一般的问题中解决你的问题:
- 查询你的oracle数据库并获得结果。
- 将Oracle日期转换为JS日期
- 使用JS计算日期
- 将JS日期转换为您想要的格式的字符串
- 在您的html页面中显示结果(在页面的某处发送一些字符串) )
通常你需要像yyyymmdd这样的日期格式来在diff系统之间进行通信。
这个方式,在互联网上找到帮助会更容易
You need to split you question in 5 simple more general problems:
- query your oracle database and get result.
- convert Oracle date to JS date
- Do calculation on dates with JS
- convert JS date to a string with the format you want
- display result in your html page (send some strings somewhere in the page)
Usually you need a date format like "yyyymmdd" to communicate between diff systems.
This way, it will be easier to find help on internet
这篇关于我想使用jsp在html表单上显示来自oracle数据库的日期计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文