Need help getting the correct value when adding START DATE and DURATION

Reply
Contributor
Posts: 67

Need help getting the correct value when adding START DATE and DURATION

Dear All,

 

I am working on SAS Enterprise Case Management XML code.

Wish to get some advice from you all.

I've been looking to count END DATE by adding START DATE and DURATION.

Heres the problem, I managed to get it done by adding up START DATE + DURATION. Here's the problem. At the screen, when i put 1st of Jan 2011 and duration of 10, End date shows 11th Jan 2011. But when i check in the database, both start date and end date are 11th Jan 2011.

 

I have been trying to play around with getStringFromDateOrTimestamp and parseDate but i still dont seem to find the solution yet.

 

It means my STARTDATE is overwrited by END DATE.

 

Here are my codes:
<field name="A.START" type="date">

<on-change>

<set-value="A.END" value="A.START + (A.DURATION*86400000)"/>

</on-change>

</field>

 

<field name="A.END" type="date">

</field>

 

<field name="A.DURATION" type="number">

<on-change>

<set-value="A.END" value="A.START + (A.DURATION*86400000)"/>

</on-change>

</field>

 

Your precious advice is much appreciated.

Ask a Question
Discussion stats
  • 0 replies
  • 180 views
  • 0 likes
  • 1 in conversation