First attribute has date, want 2nd attribute take that date and add one day
I have a user who explains her problemI have one attribute A, WHICH HAVE DATE... 03-jUL-09.I want to create another attribute B, which should be A + ONE DAY..The answer should be 04-Jul-09.Do you have a select statement for me?
I could not get it to work correctly with a SQL statement but you could use a trigger or stored proc.
In my test case I set up an environment called 'mydates'My environment table name was mydatesI created two attributes as either of these two data types datetime or timestampAnd the attribute names where mydate1, mydate2
I then created a trigger using SQL query:
CREATE TRIGGER myDateTrig ON mydatesFOR INSERT, UPDATEASUPDATE mydates set mydate2 =(SELECT dateadd(day, 1, mydate1)FROM inserted I)RETURN
(This trigger was created for MS SQL 2005 and may be different for Oracle)In ProjectWise explorer, I added a file and then went to the properties attribute tab of the file.I entered in a date for mydate1 and then clicked save and at that point mydate2 populated with the next days date.The key is that if you change mydate1 you have to hit save for mydate2 to update.
customizing an environment is something that Bentley Professional Services should be retained to do. If you have any further customizations then please contact Bentley Professional Services via your Bentley Account Manager.
Product TechNotes and FAQs
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!