How to format Date, so i get today is Tuesday

JAYESH
JAYESH Member Posts: 290
Hi Experts,

Can any one tell me how i can format date so i can get what is today, I mean Monday, Tuesday, Wednesday...etc...

Thanks
JAYESH PATEL

Comments

  • Revolution1210
    Revolution1210 Member Posts: 161
    You can use DATE2DWY

    e.g.
    DATE2DWY(WORKDATE,1))
    

    This will return an integer 1-7, Monday being 1.

    You can then use this to switch in some text constants for the actual days of the week for display purposes.
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
  • JAYESH
    JAYESH Member Posts: 290
    Thanks Ian..
    JAYESH PATEL
  • Joeri
    Joeri Member Posts: 75
    Or you can format it to show the actual name:
    FORMAT(WORKDATE,0,'<Weekday Text>');