How to tell what day of the week a given date is

Chatted with Nic, he assures us that there's an easy way to do this in the works, but here's an alternative in the meantime:

 :: We have a date field called 'Date'

 :: Add a field in the builder called 'DayNumber', and make it an 'equation'->type:'date'->date type:days->result type: numbers, and in the formula box just put your 'Date' field

 :: This will calculate the number of days that have elapsed since the beginning of computer time (16,000+ days ago, give or take). Don't worry that it doesn't look helpful, nobody except you will see this part

 :: Add a field in the builder called 'DayOfWeekNumber', and make it an 'equation'->type:'date'->date type:'days'->result type:'number', and in the formula box put 'DayNumber%7'. This is the modulus (mod), which is essentially the remainder after dividing by 7. So, 9%7=2, since 9 / 7 = 1 Remainder 2, 13%7=6, and 14%7=0

 :: It turns out that day 1 is a Thursday, so any record where the 'DayOfWeekNumber' is 0 is a Thursday. For our purposes, we needed to know if the day was a weekend, so we're looking for a 'DayOfWeekNumber' of 2 or 3 to signify a weekend day, otherwise it's a weekday.

 :: Now you can use the result of this in a calculation or equation field. If you need to display the day, you can use 'Rules to set field values' by clicking the little gear icon on the right edge of the field view to output the day of the week. 

Any questions, post below, I keep a pretty close eye on here.

This is now supported directly in our new Formula fields.

For Text values, use a Text Formula: http://helpdesk.knackhq.com/solution/articles/5000691275-text-formulas#date

For Numerical values, use an Equation: http://helpdesk.knackhq.com/solution/articles/5000443405-equations#date-functions

Thanks for taking the time to answer. 

Zapier normally treats the pull as text data, so it will literally read Knack's format. 

Anyhow, I will try to leave the date out of the table in the meanwhile until Knack releases the update. Thanks again! 

Alas, I don't think so. Nic from Knack has indicated that this is a feature on the way, but I don't know about a timeline. 

Even if you can effect the appearance from within knack, I'm still not sure how it will be treated in a Zapier pull. If Zapier simply pulls it as a date/time, it may see the same thing if Knack is only changing the formatting at the time it displays.

I suppose time will tell...

Thanks a lot for the reply. As you say, CSS formating seems to be the best way to fix this now. I just wanted to see if there was a quick fix in knack before I started analyzing the CSS in SWU. 

Thanks again. 

Isn't the readability affected by the size / orientation / settings on the end users device? Can this be fixed with CSS / formatting at the sendwithus point?

There isn't an easy way to do this directly in Knack, and I took a quick look through Zapier (I don't use it personally) and it doesn't look like there's an easy way to do it there. Unfortunately, they can't alter date/time formats either. 

Are familiar with the Knack API? I suspect it's possible to build your own tool to extract the data and format it, but this will be the most complicated approach. Hence the suggestion to look at CSS formatting first...

I just need to leave out the year because I pass the date info using zapier into Sendwithus and that goes into a table in a email template that goes to our customers. Problem is that our mobile users can't see the table well in the email because the date is too long and messes the whole table in the template. :/


@Alex, Good question, there's not an easy way to do it, but the good folks at knack tell us there's an easier way working through the development process right now. In the interim, I may be able to help come up with a workaround.  Can you tell me a little more about what you're trying to do?

What if I only want to extract day of the month and month? For instance, instead of 17/09/2015 I just want 17/09 ?