Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: How to get maximum date?
Topic Summary:
Created On: 7-Oct-2003 17:46
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 7-Oct-2003 17:46
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Does anybody have a routine which will return the maximum date from a date attribute? I have an attribute called "Date Test Ran" against a test case number

TC1 Date Test Ran = 2 September 2003
TC2 Date Test Ran = 3 December 2003


I would like the latest date returned for TC1

Any help would much be appreciated

Janet
Report this to a Moderator Report this to a Moderator
 7-Oct-2003 18:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You can get a "Maximum Date" from Madam FooFoo's (or Lance's Escorts), but it costs a lot.

I don't understand. Date attributes have only one value, the current value. Anyway, are you asking ...

[] How do I compare dates? if (TC1 > TC2) Max = TC1;else Max = TC2; where TC1, TC2, and Max are all "Date" variables.

[] How do I get the latest test date for all my objects?
Date Latest = null
for obj in mod do
{ DateO = obj.DateAttr
if (DateO > Lastest) Latest = DateO
}

- Louie
Report this to a Moderator Report this to a Moderator
 7-Oct-2003 19:47
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Louie: thanks! This works great.

Janet Ma
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.