How to format Date, so i get today is Tuesday

JAYESHJAYESH 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

  • Revolution1210Revolution1210 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
  • JAYESHJAYESH Member Posts: 290
    Thanks Ian..
    JAYESH PATEL
  • JoeriJoeri Member Posts: 75
    Or you can format it to show the actual name:
    FORMAT(WORKDATE,0,'<Weekday Text>');
    
Sign In or Register to comment.