i havent used java.util.date instead i have used ecternal plug-in Jcalender......since i have to so a complete Graphical app for the hotel....i need to use jCalender
Ravi Hckd wrote:i havent used java.util.date instead i have used ecternal plug-in Jcalender......since i have to so a complete Graphical app for the hotel....i need to use jCalender
Not sure about Jcalendar plug in. But if it's similar to the Java class Calendar, then you can first convert the Calendar or Jcalendar to a Date then subtract.
The functionality of the plug-in is different......you get the time /date in IS format.....but i'm unable to subtract the dates...all that i've done is or can be done is
convert it into string...can you tell me if is it possible to reconvert it into integer(the date stored as String) then subtract it.....
also should i upload the jCalender plug-in so that you can have a look??
Ravi Hckd wrote:The functionality of the plug-in is different......you get the time /date in IS format.....but i'm unable to subtract the dates...all that i've done is or can be done is
convert it into string...can you tell me if is it possible to reconvert it into integer(the date stored as String) then subtract it.....
also should i upload the jCalender plug-in so that you can have a look??
You should check the API for JCalendar plug-in. Look for methods that converts a string to Date or long.
Having code examples can help us better understand your issue.
Your code shows that you do in fact get the dates as Date objects. You're the one who is then formatting them to a string. Just use the Date objects, and you can use the approach that Arnaud suggested.
(Edit - that Arnaud suggested 8 years ago - you really should have opened a new thread for this).
I'm new to this site....can you post that thread you mentioned for me?? Regarding the code...yes you do get the object but that's the dead end for it....
You cannot process it further( considering my knowledge:::: working on java first time------pretty different from .NET that;s why) or maybe there is another way....i don't know...
please can you give me the exact code for that...should i upload the entire application so that you get a better understanding....
waiting for your reply...do let me know
I am in a similar situation where am getting a DATE from oracle and counting the number of days till the current day.
Now, how to convert oracle DATE into java.util.DATE to find the difference in days ?
@Jeff Verdegan :: If you have dates stored in Oracle you can write a simple function to get the number of days.....then all you need is to retrieve that integer value.......
Will post that function in sometime....also Oracle 11g Release 2 has excellent features regarding date manipulation.....hope this solves your problem
Mark Butcher wrote:
Now, how to convert oracle DATE into java.util.DATE to find the difference in days ?
There's no such thing as "convert oracle DATE into java.util.DATE to find the difference in days". At least, not without you making it.
There are two main parts to your question:
1) Convert oracle DATE into java.util.DATE. This is accomplished by calling ResultSet.getDate(...).
2) Find the difference between two dates. I believe that is answered in this thread.
So, what specifically are you having trouble with?
@Jeff Verdegan :: If you have dates stored in Oracle you can write a simple function to get the number of days.....then all you need is to retrieve that integer value.......
Will post that function in sometime....also Oracle 11g Release 2 has excellent features regarding date manipulation.....hope this solves your problem