For Each Day with TimeStamp - Bug?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

For Each Day with TimeStamp - Bug?

Post by johntalbott »

CREATE BO FOR EACH DAY is incrementing TimeStamps by Hours rather than Days.

The following code ...

CREATE Scheduled_ObjectiveActivity FOR EACH DAY BETWEEN ObjectiveActivity.StartTime AND ObjectiveActivity.RecurrenceEndDate WITH Scheduled_ObjectiveActivity.ObjectiveActivity = ObjectiveActivity, Scheduled_ObjectiveActivity.Subject = ObjectiveActivity.Subject, Scheduled_ObjectiveActivity.StartTime = LOOP_ITERATION, Scheduled_ObjectiveActivity.EndTime = DATE_ADD(LOOP_ITERATION,1)

Is producing ...
ForEachDay.PNG
ForEachDay.PNG (26.37 KiB) Viewed 18097 times
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: For Each Day with TimeStamp - Bug?

Post by customaware »

Try updating the EndTime as a RULE


Scheduled_ObjectActivity IS NEW

Scheduled_ObjectiveActivity.EndTime = DATE_ADD(Scheduled_ObjectiveActivity.StartTime,1)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: For Each Day with TimeStamp - Bug?

Post by johntalbott »

I can try that as a workaround, but I'd rather keep everything in the process as it's part of a larger If ... Else.

For Each Week and For Each Month work as expected, so this seems it must be a bug.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: For Each Day with TimeStamp - Bug?

Post by RocketRod »

I notice that your date range is between a timestamp and a date attribute? If so try DATE_PART(ObjectiveActivity.StartTime). Also I usually get the day difference first between the dates and then do a

For each number between 1 and daydifference variable. Then just reconstruct your timestamps.

Cheers Rod
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: For Each Day with TimeStamp - Bug?

Post by johntalbott »

Thx Rod. The RecurrenceEndDate is also a TimeStamp. The DATE_PART suggestion is valid though.

Interestingly enough after my last post ... I wrapped both dates with DATE_PART and that did the trick.

It still seems like a bug to me.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: For Each Day with TimeStamp - Bug?

Post by RocketRod »

Great, glad its all ok now. As to if it's a bug depends on if FOR EACH DAY expects dates or timestamps. Only Support can answer that.

Cheers Rod
Post Reply