Results 1 to 2 of 2

Thread: Date Time Picker Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    12

    Date Time Picker Problem

    If the user selects Any day via a date time picker, is there a way to display the day previous to that. For instance, on form_Load, if the following code was used:

    dim temp as date
    temp = DateTimePicker1.Value.Date

    Can i do something like:

    temp = temp - 1
    msgBox(temp)


    .................................
    I don't know much about DateTimePickers, but can you access dates via Index number or something like that. That would solve mu problem as well.

    Thanks,
    Spectrum

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    Code:
    temp = DateAdd(DateInterval.Day, -1, DateTimePicker1.Value)

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