Skip to main content
Solved

How we can get WeekID from a Date?


aaghaei
Captain II
Forum|alt.badge.img+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

 

Best answer by aaghaei

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

View original
Did this topic help you find an answer to your question?

4 replies

aaghaei
Captain II
Forum|alt.badge.img+9
  • Author
  • Captain II
  • 1176 replies
  • Answer
  • June 25, 2023

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


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2621 replies
  • June 25, 2023

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


Forum|alt.badge.img
  • Jr Varsity II
  • 39 replies
  • July 26, 2023

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.

 

 

 


aaghaei
Captain II
Forum|alt.badge.img+9
  • Author
  • Captain II
  • 1176 replies
  • July 26, 2023

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings