Joined: 01 Feb 2017
Location: United States
Online Status: Offline
Posts: 5
Topic: How to separate dates store in the same field Posted: 07 Feb 2017 at 3:53am
I am trying to extract two different dates data store in the same field, depending on a different field...
log.date lot.type
01/01/2016 open
01/03/2016 closed
What I am trying to do is to put the open date in one column and closed date in a different column, so I can get the duration of time between open date and closed date... thanks for any help.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 07 Feb 2017 at 4:32am
There are lots way this is possible. But one way that I like to do it is with shared variables. It works better if you are grouping by something. So in the details you would have a formula. One for the open date and one for the closed date (You could eliminate part of the code if you can guarantee the order of the dates).
The code for each formula would be similar
shared vardate opendate; if {lot.type} = 'open' then opendate := {log.date}; // This assumes more than two types shared vardate closeddate; if (lot.type} = 'closed' then closeddate := {log.date};
then in the group footer you would have a formula for each variable .
shared opendate; //This will display the date Then you will have a formula that will do a date diff (I do not know what kind of duration you want).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum