![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: "Date" problems Topic Summary: Created On: 1-Jul-2004 18:33 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Thanks for all the help. I solved my own problem by using a get statement to bring the DBE entry into the rest of my script. | |
![]() |
|
I have developed a need to be able to scan all the object histories in a project and compare the date of the most recent change to a specified date. This comparison needs to be outputted to a report listing all the objects with changes after the specified date. I've managed to whip together the code for all the date retrievals and comparisons, and the report, when the date is hard coded into the script. My problem comes with setting it up for my user to identify the date they need to compare. I've build a DB box, but I can't get the data from the DB Box to convert to a Date. If anyone has any insight on this I'd appreciate it.
Object o Module n = current Date d History hr string p = "" DB SETDATE = create "Set Date to search from" DBE e = field(SETDATE,"Date: ","",30) void dated(DB box) { Date d = string e } ok(SETDATE, "Search",dated) show SETDATE // Check the user is in a requirements module string cmodname = n."Name" cmodname = cmodname[0:2] if (cmodname != "REQ") { ack "This function can only be run from a requirements module." halt } string filename = "C:/change dates.txt" Stream wfile = write filename for p in current Project do { ckmod = p Module m = read(ckmod,false) // Check the module is a requirement module mtype = type m string modname = m."Name" string modtyp = modname[0:2] if ((mtype == "Formal") && (modtyp == "REQ")) { for o in m do{ string modName = m."Name" for hr in o do { if hr.date >d then { string an = probeAttr_(o,"Object Identifier") wfile << ""modName "\t"an "\t"hr.date"\n" } } //end of for hr in o do } //end of for o in m do if ((p != "Users") && (n != m)) close m } //end of if ((mtype == "Formal") && (modtyp == "REQ")) } //end of for p in current Project do ------------------------- David A. Rose TSgt USAF NCOIC System Administration Edited: 1-Jul-2004 at 19:41 by David Rose |
|
![]() |
|
![]() |
|
I've developed a quick test for validating the date input for a given field. Esentially you need to:
1. Trap errors with noError 2. Convert the string to a date variable 3. Check for errors using lastError See the attached code for an example. -Dennis |
|
![]() |
|
![]() |
|
Attached fDateOf() does it, and uses fIsValidDate().
|
|
![]() |
|
![]() |
|
Thanks for all the help. I solved my own problem by using a get statement to bring the DBE entry into the rest of my script.
------------------------- David A. Rose TSgt USAF NCOIC System Administration |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
"Date" problems
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.