LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  how to return day of week??

    Employee
    Posted 07-23-2009 06:46

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: kim_rana

    Is there a function to return the day of the week?

    Eg. If date is 23 July 2009 then return Thursday.


  • 2.  RE: how to return day of week??

    Employee
    Posted 07-23-2009 21:14

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mmarinelli

    While such an operator is planned for a future release, there currently isn't a BRAINScript function to do this. However, you can work around this using the current set of operators. I've attached a graph which illustrates how to determine the day of week for any date. It requires the seeding of the filter node with a known Sunday anchor date (I chose 2009-06-28), and I don't think it will work with any dates before 1970, but it should otherwise do what you're looking for.
    Attachments:
    DayOfWeek.brg


  • 3.  RE: how to return day of week??

    Employee
    Posted 03-26-2014 08:24

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: awilliams1024

    The BRAINScript weekday(dateTime) function returns a number representing the day of the week of the given date or datetime parameter. The week begins on Sunday, whose weekday is zero. The returned value is of Type: integer. The returned value has range: 0-6.