Mixpanel Community Icon
  • Avatar of Andrew S.
    Andrew S.
    ·
    ·

    Very nice. I've thought about trying to figure this out and now that I've seen your formula, I'm positive I wouldn't have gotten there on my own . . . 🙂 You may want to augment your summary to include another option. Combining it with IFS and you can get the words to show.

    IFS((FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=0,"Sunday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=1,"Monday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=2,"Tuesday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=3,"Wednesday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=4,"Thursday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=5,"Friday",(FLOOR(@"""{"label":"Time","propertyDefaultType":"datetime","resourceType":"event","type":"number","value":"$time"}"""@/86400)+4)%7=6,"Saturday")
  • Avatar of Andrew S.
    Andrew S.
    ·
    ·
  • Avatar of James C.
    James C.
    ·
    ·

    Thanks Andrew, that's a great addition - I'll be sure to include it! And I can't take any credit for the formula, it came from a Stack Overflow question about Unix time - I just applied it to Mixpanel