Skip to main content
Solved

Display Day of Week in GI


Forum|alt.badge.img

I would like to display the Day of the week in a GI,  Either display, Sunday, Monday, Tuesday, etc… 

or display, 1, 2, 3,   Where 1 is equal the first day of the week etc…

 

So for Document Date,  I would like to see 

 

Document Date   Document Day

10/6/2023          Monday

 

 

Best answer by Vignesh Ponnusamy

Hi @sspencer,

In the data column of the field you can use switch condition along with DayOfWeek,

=Switch(  
DayOfWeek( [SOOrder.OrderDate] )= 1, 'Sun', 
DayOfWeek( [SOOrder.OrderDate] )= 2, 'Mon',
DayOfWeek( [SOOrder.OrderDate] )= 3, 'Tue',
DayOfWeek( [SOOrder.OrderDate] )= 4, 'Wed',
DayOfWeek( [SOOrder.OrderDate] )= 5, 'Thu',
DayOfWeek( [SOOrder.OrderDate] )= 6, 'Fri',
DayOfWeek( [SOOrder.OrderDate] )= 7,'Sat')

Good Luck.!

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

5 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @sspencer,

In the data column of the field you can use switch condition along with DayOfWeek,

=Switch(  
DayOfWeek( [SOOrder.OrderDate] )= 1, 'Sun', 
DayOfWeek( [SOOrder.OrderDate] )= 2, 'Mon',
DayOfWeek( [SOOrder.OrderDate] )= 3, 'Tue',
DayOfWeek( [SOOrder.OrderDate] )= 4, 'Wed',
DayOfWeek( [SOOrder.OrderDate] )= 5, 'Thu',
DayOfWeek( [SOOrder.OrderDate] )= 6, 'Fri',
DayOfWeek( [SOOrder.OrderDate] )= 7,'Sat')

Good Luck.!


Forum|alt.badge.img
  • Jr Varsity II
  • 27 replies
  • March 11, 2025

Thank you ​@Vignesh Ponnusamy , 

 

This was a huge help for me!!!


Forum|alt.badge.img
  • Jr Varsity II
  • 27 replies
  • March 27, 2025
Vignesh Ponnusamy wrote:

Hi @sspencer,

In the data column of the field you can use switch condition along with DayOfWeek,

=Switch(  
DayOfWeek( [SOOrder.OrderDate] )= 1, 'Sun', 
DayOfWeek( [SOOrder.OrderDate] )= 2, 'Mon',
DayOfWeek( [SOOrder.OrderDate] )= 3, 'Tue',
DayOfWeek( [SOOrder.OrderDate] )= 4, 'Wed',
DayOfWeek( [SOOrder.OrderDate] )= 5, 'Thu',
DayOfWeek( [SOOrder.OrderDate] )= 6, 'Fri',
DayOfWeek( [SOOrder.OrderDate] )= 7,'Sat')

Good Luck.!

Hey ​@Vignesh Ponnusamy, My Day of the week seems to be off, and I believe it maybe to be due to Time Zone difference because it seems to be 7 hours off since I am on Mountain time.

 

Do you have any ideas of how to adjust to time zone? 

 

Would it be as simple to just add a -7 somewhere? Or would that not work in this instance because we are dealing with date instead of hours?


Forum|alt.badge.img
  • Jr Varsity II
  • 27 replies
  • April 7, 2025
bodiec wrote:
Vignesh Ponnusamy wrote:

Hi @sspencer,

In the data column of the field you can use switch condition along with DayOfWeek,

=Switch(  
DayOfWeek( [SOOrder.OrderDate] )= 1, 'Sun', 
DayOfWeek( [SOOrder.OrderDate] )= 2, 'Mon',
DayOfWeek( [SOOrder.OrderDate] )= 3, 'Tue',
DayOfWeek( [SOOrder.OrderDate] )= 4, 'Wed',
DayOfWeek( [SOOrder.OrderDate] )= 5, 'Thu',
DayOfWeek( [SOOrder.OrderDate] )= 6, 'Fri',
DayOfWeek( [SOOrder.OrderDate] )= 7,'Sat')

Good Luck.!

Hey ​@Vignesh Ponnusamy, My Day of the week seems to be off, and I believe it maybe to be due to Time Zone difference because it seems to be 7 hours off since I am on Mountain time.

 

Do you have any ideas of how to adjust to time zone? 

 

Would it be as simple to just add a -7 somewhere? Or would that not work in this instance because we are dealing with date instead of hours?

Update:

 in order to adjust for time zones, you must add 

(DateAdd([DATAFIELD], ‘h’, -6)  The -6 being the time zone you are in, so it would need to be changed on each day of the week.

 

This is what mine looks like:

=Switch( DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 1, 'Sun', DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 2, 'Mon',DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 3, 'Tue',DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 4, 'Wed',DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 5, 'Thu',DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 6, 'Fri',DayOfWeek(DateAdd([AMBatch.CreatedDateTime],’h’,-6))= 7,'Sat')


plambert
Jr Varsity III
Forum|alt.badge.img
  • Jr Varsity III
  • 11 replies
  • April 8, 2025

I would also like to add that there is a DAC for such information: PX.SM.DateInfo
It contains basic information about dates from Jan 1st 1970 to June 6th 2079, including the Day of Week (Name).
As to the time zone adjustment, that can be done in the join conditions with the same formula:

 


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