Solved

How we can get WeekID from a Date?

  • 25 June 2023
  • 4 replies
  • 150 views

Userlevel 7
Badge +9

Hello all,

Do we have a function in Acumatica that we pass a date and returns the WeekID which is used in EPTimeCard.WeekID? The format of WeekID stored in DB I see is “YYYY##” which ## is a sequential counter. I see Acumatica is using EPWeekRaw that has some properties including Start and End Date but I need it opposite. I have the date and I need the equivalent WeekID. I can calculate the Week # but I want to be consistent with what Acumatica does. considering Acumatica has Custom Weeks

 

icon

Best answer by aaghaei 25 June 2023, 07:57

View original

4 replies

Userlevel 7
Badge +9

I got it, it is PXWeekSelector2Attribute.GetWeekID(MyDate)

Userlevel 7
Badge

Thank you for sharing your solution with the community @aaghaei!

Userlevel 3
Badge

Is there something similar to be used in reports?  I would like to join the ARTranDate to the DateInfo DAC so I can get the WeekEnding ID and group by the WeekEndingID only I can’t because it is non existent.  Is there an alternative?  I need a report that has sales #’s by week for the past 5 weeks.  Thanks.

 

 

 

Userlevel 7
Badge +9

@dgross

please have a look at the below post. It might be helpful. Report Designer is not my strong suit and honestly I’m not interested in it so I have not spend much time on it.

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved