Solved

How to get the day name from a Date?

  • 23 February 2023
  • 2 replies
  • 117 views

Userlevel 1

Does anyone know how to get the day name (‘Monday’, Tuesday’) from a date?  Building a report for employee timecard tacking, but the records only have the date. Based on the given date we need to get the day. For ex: 20/02/2023 ‘Monday’   8:00h

 

icon

Best answer by hkabiri 23 February 2023, 21:29

View original

2 replies

Userlevel 6
Badge +5

@Allshashw  You can use =DayOfWeek(YourDate ) and switch case to display the day as result of this function is 0-6

 

Something like this

=Switch(  DayOfWeek( YourDate )= 0, 'Sat',
 DayOfWeek( [CATran.TranDate] )= 1,'Mon',
DayOfWeek( [CATran.TranDate] )= 2,'Tue',
DayOfWeek( [CATran.TranDate] )= 3,'Wed',
DayOfWeek( [CATran.TranDate] )= 4,'Thu',
DayOfWeek( [CATran.TranDate] )= 5,'Fri',
DayOfWeek( [CATran.TranDate] )= 6,'Sat')

Userlevel 1

@Allshashw  You can use =DayOfWeek(YourDate ) and switch case to display the day as result of this function is 0-6

 

Something like this

 

=Switch(  DayOfWeek( YourDate )= 0, 'Sat',
 DayOfWeek( [CATran.TranDate] )= 1,'Mon',
DayOfWeek( [CATran.TranDate] )= 2,'Tue',
DayOfWeek( [CATran.TranDate] )= 3,'Wed',
DayOfWeek( [CATran.TranDate] )= 4,'Thu',
DayOfWeek( [CATran.TranDate] )= 5,'Fri',
DayOfWeek( [CATran.TranDate] )= 6,'Sat')

 

Thanks a lot! this is working. 

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