• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do i compare two dates  RSS feed

 
Kiran Er
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to compare two dates. One of the date come from the flat file and another date from a database. Both the dates are in the same format ("MM-dd-yyyy' 'HH:mm:ss").

Please help me to get the right code for the comparision.

Regards,
Kiran
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pretty straightforward. What have you tried so far?  Or are you looking for a hint to start?

Henry
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dates don't have a format. The format is only used to display the dates. Have you been through the API documentation? Why are you not using the Java8 classes, which are much better than Date?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!