Find day name of a given date.
I received a requirement in which I had to extract the day name of a given date.
for this i use dayName function.
Example of usecase where dayName() function is use:
Displaying the day of a transaction date.
Filtering records based on specific weekdays.
Generating reports based on business days.
dayName(int number)
Returns:
Name of day specified to a number.
Input parameter:
Number of day in a week.
for this first i have to find day in integer for this i use dayOfWeek function.
Function dayOfWeek()
Returns:
dayOfWeek(date) function ruturns a day in integer.
Intut parameter:
You need to pass a date value.
To find day name i use dayName(integer) function return a day name of a gevin day
Expression:
i = dayOfWeek(date)
dayName(i)
Comments
Post a Comment