Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

how to compare two date of type timestamp?

Hi..
     I want to write the script that can compare dates .
 for example Planned start  date and Planned end date if Planned End date is entered as greater than planned start date then error message must be displayed in workItem.
How i compare the two dates ?

Please Help.. 

0 votes


Accepted answer

Permanent link
I assume that you are talking about JavaScript. In this case, you need to parse the value (most likely a string) into a date value, then compare.
http://www.w3schools.com/js/js_date_methods.asp

If for some reason you are referring to Java, see samples below.
http://javarevisited.blogspot.com.au/2012/02/3-example-to-compare-two-dates-in-java.html
shweta ranaware selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Aug 14 '15, 5:07 a.m.

Question was seen: 3,411 times

Last updated: Aug 17 '15, 1:17 a.m.

Confirmation Cancel Confirm