cancel
Showing results for 
Search instead for 
Did you mean: 

day of the week

0 Kudos

good day, i need to determine the day of the week. the variable is in text format which i have converted to date. i have used the DayName function to determine the day of the week based on the newly converted date value, but i still get #error.

text to date conversion:

=FormatDate(ToDate([PostingDate];"yyyyMMdd");"yyyy/MM/dd")

Day of the Week:

=DayName(ToDate([newdate];"ddd"))

anyone that can assist i would appreciate it.

moshenaveh
Community Manager
Community Manager
0 Kudos
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then Edit.
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

Accepted Solutions (0)

Answers (1)

Answers (1)

ayman_salem
Active Contributor
0 Kudos

Change your variables to:

newdate: =ToDate([PostingDate];"yyyyMMdd")

Day of the Week: =DayName([newdate])

or you can define them in one variable --> DayName(ToDate([PostingDate];"yyyyMMdd"))

...

hopefully that helps