Announcement

Collapse
No announcement yet.

day of the week - number or srting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • day of the week - number or srting

    I need the days of the week (Mon, Tue, Wed ...). getDay() returns numbers from 1 to 31, contrary to what it is suposed to do, as described in EFS function reference. The Date() object returns a string, where the first 3 characters are what I need. How to parse this string?;
    " substr(string, start, length)" is not recognized by EFS2 engine.

    Any suggestions how to get the day of the week as a number from 0 to 7 or a string or both?

  • #2
    Re: day of the week - number or srting

    dtrosty
    See this thread on a similar topic
    FWIW the getDay() [and also day()] functions return the date of the bar whereas the getDay() method of the Date Object returns the day of the week
    As to the substr() method of the String Object this uses only 2 arguments [the second of which is optional] ie startIndex and length
    Alex


    Originally posted by dtrosty
    I need the days of the week (Mon, Tue, Wed ...). getDay() returns numbers from 1 to 31, contrary to what it is suposed to do, as described in EFS function reference. The Date() object returns a string, where the first 3 characters are what I need. How to parse this string?;
    " substr(string, start, length)" is not recognized by EFS2 engine.

    Any suggestions how to get the day of the week as a number from 0 to 7 or a string or both?

    Comment

    Working...
    X