CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Long date

  1. #1
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    Long date

    Hi folks! Some more questions about the DTPicker here.

    I have tried to use the DTPicker with the Long Date style (e.g. an entry is 4:55:00 7/7/30) but I can't seem to give the user the option to select the time. The option that appears when the user clicks the DTPicker is the display of the long date and the calendar. I need to connect the DTPicker to an SQL table with the date and time in the long format.

    How can I give the user the option to select the time as well?

    Thanks,

    Andrew


  2. #2
    Join Date
    Sep 1999
    Posts
    202

    Re: Long date

    Hi
    private Sub Form_Load()
    DTPicker1.Format = dtpCustom
    DTPicker1.CustomFormat = "yyyy/MM/dd (hh:mm:ss)"
    End Sub




  3. #3
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    Re: Long date

    Hi Bruno, thanks for the reply. Actually I figured that out this morning since I just got the VB6.0 reference library. Good book series.

    Anyway, the problem that I still have is that I want for the users to not have to manually key in the time, as in I want the user to be able to use the mouse to select the time like when the DTPicker style is set to dtpShortTime. But with the custom view I can only allow the user to select the month.

    Any suggestions?

    Andrew


  4. #4
    Join Date
    Sep 1999
    Posts
    202

    Re: Long date

    DTPicker1.Format = dtpCustom
    DTPicker1.CustomFormat = "yyyy/MM/dd (HH:mm:ss)"
    DTPicker1.UpDown = true




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

Featured