This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have the following date format for the date field 'YYYY-MM-DD' and I would like to somehow calculate only the dates that are 'Saturday'. Is there anyway to do this?
You can create a new field in a Formula tool with the expression...
...which gives you the day of the week. Then just filter on "Saturday".
You can check out all of the Date Specifiers in Help.
Thanks Rod! I just tried and it says 'Error: Malformed Function Call'
I wrote this: DateTimeParse([Transaction Date],%A)
I checked the format type of the 'Transaction Date' field and it is indeed 'Date'. So I don't know what could be wrong.... Any ideas?
You need quotes around the specifier...
Ok hopefully last question... Alteryx says it cannot convert to weekday because..." DATETIMEPARSE: Cannot convert "2016-04-20" to a date/time with format "%A": Weekday is out of range 0..6"
Sorry, @rwood330, this one is totally on me.
It should have been...
DateTimeFormat goes from Date to String.
DateTimeParse goes from String to Date.
I totally messed you up. ;-(