Results 1 to 2 of 2

Thread: Date math question..

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Posts
    13

    Date math question..

    Ok, what I basically need is to be able to display yesterday's date... is there not a simple way of doing this?

    example:

    TextBox.Text = Today() -1


    just today's date minus 1 day (the above doesn't work)


    anyone?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Code is C#, but try this:

    Code:
    DateTime.Today.AddDays(-1).ToLongDateString();
    Dont gain the world and lose your soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width