Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
SQL
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?
Posted

1 solution

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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900