Skip to main content

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

 

@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( eCATran.TranDate] )= 1,'Mon',
DayOfWeek( eCATran.TranDate] )= 2,'Tue',
DayOfWeek( eCATran.TranDate] )= 3,'Wed',
DayOfWeek( eCATran.TranDate] )= 4,'Thu',
DayOfWeek( eCATran.TranDate] )= 5,'Fri',
DayOfWeek( eCATran.TranDate] )= 6,'Sat')


@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( eCATran.TranDate] )= 1,'Mon',
DayOfWeek( eCATran.TranDate] )= 2,'Tue',
DayOfWeek( eCATran.TranDate] )= 3,'Wed',
DayOfWeek( eCATran.TranDate] )= 4,'Thu',
DayOfWeek( eCATran.TranDate] )= 5,'Fri',
DayOfWeek( eCATran.TranDate] )= 6,'Sat')

 

Thanks a lot! this is working. 


Reply