Time Stamp help :(

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Mark HHP
Posts: 387
Joined: Mon May 06, 2013 6:59 am
Location: Cape Town, South Africa

Time Stamp help :(

Post by Mark HHP »

Hello

I have a QuoteLineItem BO with a date format set to MMMM yyyy so it comes out as February 2013 etc.

How can I pull a query for all QuoteLineItems with a month of my choosing (as I have to pull this report monthly) AS WELL AS for the last 5 years.

So I need to say I'm looking for June for this year as well as previous 4 years worth of June (per Consultant). The background is: we need the Consultants to see who booked in June as well as June over 5 years so that they can target those people again.

Also, if anyone has a reference for Timestamp/Date calculations could you point me in that direction? I stumble on them so often.
Mark
Running V5.7 (Build 1714) Linux Server. MySQL
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: Time Stamp help :(

Post by RocketRod »

Try

MONTH(DATE_PART(QuoteLineItem.SomeTimeStamp)) = LoggedInSystemUser.TempMonth AND YEAR_DIFFERENCE(DATE_PART(QuoteLineItem.SomeTimeStamp), CURRENT_DATE) < 5
Mark HHP
Posts: 387
Joined: Mon May 06, 2013 6:59 am
Location: Cape Town, South Africa

Re: Time Stamp help :(

Post by Mark HHP »

Hi RocketRod

Just to help me understand fully, what is LoggedInSystemUser.TempMonth? Is TempMonth a built-in attribute like LoggedIn?
Mark
Running V5.7 (Build 1714) Linux Server. MySQL
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Re: Time Stamp help :(

Post by RocketRod »

Temporary attribute that you set the chosen month to. Doing it this way allows different users to request different months.

Cheers Rod
Post Reply