How to get day's name by a string date formatted "YYYY-MM-DD"

Hello everyone,
I’m dealing with an API that gives me a date (string) formatted like this “YYYY-MM-DD”, and I would like to know is there a function that turns that String into day’s name like
“2022-06-06” to “Monday”.
Thanks!

Good morning !

Unreal has a function called “Date Time From String” which should work for what you are trying to achieve. The date input needs to be in a particular format, which I’ve shown in the image below. I set up just a real quick way to test this functionality that you can throw into a character blueprint if you want to test it yourself. There is also a nearly identical node called “Date Time from ISO String” which takes date/time from ISO 8061 standard time format.


From here we do need to go into C++ for a native solution.

This page shows the c++ code to implement a function to get day of week.
Please let me know if this solution works for you.

1 Like

Thank you so much @anon58774453 for your quick response !

I’ll be trying it and I’ll let you know about what I’ve done.

Hello again @anon58774453,

That was helpful but I had to make some custom functions to fulfill the needs.
Thank you once again !