Results 1 to 13 of 13

Thread: DTPicker - time is also save do the DB - I don't want this!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Question DTPicker - time is also saved to the DB - I don't want this!!!

    Hi!!!

    I have a Problem with the DTPicker - I use it in a VB6-Form with a SQL7-DB. I just want to save the date - without the time - i tried several times to format the DTPicker - I couldn't find a solution!!!

    Please help urgently!!!

    Thank you !!!

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Format(datepickerwhatever,"yyyymmdd")
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    Set format to dtpShortDate?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Thumbs down DTPicker

    Hi HeSaidJoe, hi James Stanich!

    I have tried this already - if you select the date form the dtpicker (with the pull-down calender) then the dtpicker sends the time with ...

    Markus

    [Edited by MTuma on 09-26-2000 at 10:32 AM]

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9
    Originally posted by James Stanich
    Set format to dtpShortDate?
    Hi HeSaidJoe, hi James Stanich!

    I have tried this already - if you select the date form the dtpicker (with the pull-down calender) then the dtpicker sends the time with ...

    Markus

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    HI,
    Where is the dtpicker under components so I can pull it
    down and see what happens?
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Re: <?>

    Originally posted by HeSaidJoe
    Format(datepickerwhatever,"yyyymmdd")
    Hi HeSaidJoe, hi James Stanich!

    I have tried this already - if you select the date form the dtpicker (with the pull-down calender) then the dtpicker sends the time with ...

    Markus

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Re: <?>

    Originally posted by HeSaidJoe
    HI,
    Where is the dtpicker under components so I can pull it
    down and see what happens?
    It's very nice that you help me!!!

    You can find it under components, controls, Microsoft Windows Common Controls-2 6.0 (SP3)

  9. #9
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'I don't get any time...just a date in the visual
    'and if I click down the calander and click a date
    'all I get is that data.

    Private Sub DTPicker1_Change()
    MsgBox DTPicker1.Value
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  10. #10

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Re: <?>

    Originally posted by HeSaidJoe
    'I don't get any time...just a date in the visual
    'and if I click down the calander and click a date
    'all I get is that data.

    Private Sub DTPicker1_Change()
    MsgBox DTPicker1.Value
    End Sub
    Wenn I drag/drop the DTPicker in the Watches-Tool I get for example 10.10.2000 16:45:02

    How can I format this ???

  11. #11

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Re: <?>

    Originally posted by HeSaidJoe
    'I don't get any time...just a date in the visual
    'and if I click down the calander and click a date
    'all I get is that data.

    Private Sub DTPicker1_Change()
    MsgBox DTPicker1.Value
    End Sub
    When I do this:

    Private Sub DTPicker1_Change()
    MsgBox DTPicker1.Value
    End Sub

    I get 26.09.2000 16:54:15


  12. #12
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    Private Sub DTPicker1_Change()
        MsgBox DTPicker1.Value
    End Sub
    
    Private Sub Form_Load()
    
        DTPicker1.Format = 0
    
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  13. #13

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    9

    Talking Re: <?>

    Originally posted by HeSaidJoe
    'I don't get any time...just a date in the visual
    'and if I click down the calander and click a date
    'all I get is that data.

    Private Sub DTPicker1_Change()
    MsgBox DTPicker1.Value
    End Sub

    I got it!!!!!

    The trick is that the value property must be set to a date, if it is emtpy you get the time too it you change the dtpicker-value!

    Thank you very much!!!

    Greetings from Austria!

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