Results 1 to 5 of 5

Thread: different in days by number

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    2

    different in days by number

    Hi,

    What is the correct syntax to find the different in days by number?


    Due Date : 31/7/2004
    Date Return: 2/8/2004 which is =now()
    No Of day : = 3 days << how to get this value?

  2. #2
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    datediff() function mate. cheers.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    2
    Originally posted by brown monkey
    datediff() function mate. cheers.
    This is the code I use



    txtFine.Text = CStr(DateDiff(DateInterval.Day, CDate(txtDueDate.Text), CDate(Now())))


    Where txtDueDate.Text = 1/8/04
    And the result is 207 ??

  4. #4
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    it's month/day/year mate. not day/month/year. 207 alright. from jan/one/two thousand four.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You can also use the pure .NET way by using TimeSpan class .

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