Re: date / time picker


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Re: date / time picker

  1. #1
    Tim Martin Guest

    Re: date / time picker


    Jim-
    Thanks. datetimepicker looks most promising. Now does anyone have any code
    snipsets to share regarding its use?
    I need to get the date and time from my user not just the date. I also need
    to restrict the dates that he can select. And, I am using VBA inside a third
    party software product,
    not full VB. Any help would be appreciated.
    Tim

    "Jim Pragit" <James.Pragit@BakerNet.com> wrote:
    >
    >Tim,
    >
    >How free form do you want it? VB provides IsDate and CDate functions.

    IsDate
    >and CDate are very flexible and can handle (some) free form input. Test
    >these to see if they can do what you want.
    >
    >As an alternative, you can use the Date/Time picker control instead of the
    >InputBox function.
    >
    >- Jim
    >
    >"Tim Martin" <tpmartin@bigfoot.com> wrote:
    >>
    >>Does anyone have a good date and time validation routine or technique they
    >>would like to share?
    >>When my user needs to add a record to the database, I need him to give

    the
    >>date and time for the record. I would like to be able to allow him to enter
    >>the information from an inputbox that I open up in VBA when he clicks on
    >>a button. This means that the user will be entering the date and time as
    >>a string, sort of in a free format. Then the program will have to validate
    >>what has been entered.

    >



  2. #2
    Tim Martin Guest

    Re: date / time picker


    Jim-
    Thanks. datetimepicker looks most promising. Now does anyone have any code
    snipsets to share regarding its use?
    I need to get the date and time from my user not just the date. I also need
    to restrict the dates that he can select. And, I am using VBA inside a third
    party software product,
    not full VB. Any help would be appreciated.
    Tim

    "Jim Pragit" <James.Pragit@BakerNet.com> wrote:
    >
    >Tim,
    >
    >How free form do you want it? VB provides IsDate and CDate functions.

    IsDate
    >and CDate are very flexible and can handle (some) free form input. Test
    >these to see if they can do what you want.
    >
    >As an alternative, you can use the Date/Time picker control instead of the
    >InputBox function.
    >
    >- Jim
    >
    >"Tim Martin" <tpmartin@bigfoot.com> wrote:
    >>
    >>Does anyone have a good date and time validation routine or technique they
    >>would like to share?
    >>When my user needs to add a record to the database, I need him to give

    the
    >>date and time for the record. I would like to be able to allow him to enter
    >>the information from an inputbox that I open up in VBA when he clicks on
    >>a button. This means that the user will be entering the date and time as
    >>a string, sort of in a free format. Then the program will have to validate
    >>what has been entered.

    >



  3. #3
    Jim Pragit Guest

    Re: date / time picker


    Tim,

    Using the DateTimePicker control is very straight forward. Use the Format
    property to select between date and time, and use the MinDate and MaxDate
    properties to restrict the user's input to a specific range.

    BTW, technically, this isn't an API question so if you need more help, try
    posting your question to the vb.general or vb.getting.started newsgroup.

    - Jim

    "Tim Martin" <tpmartin@bigfoot.com> wrote:
    >
    >Jim-
    >Thanks. datetimepicker looks most promising. Now does anyone have any code
    >snipsets to share regarding its use?
    >I need to get the date and time from my user not just the date. I also need
    >to restrict the dates that he can select. And, I am using VBA inside a third
    >party software product,
    >not full VB. Any help would be appreciated.
    >Tim
    >
    >"Jim Pragit" <James.Pragit@BakerNet.com> wrote:
    >>
    >>Tim,
    >>
    >>How free form do you want it? VB provides IsDate and CDate functions.


    >IsDate
    >>and CDate are very flexible and can handle (some) free form input. Test
    >>these to see if they can do what you want.
    >>
    >>As an alternative, you can use the Date/Time picker control instead of

    the
    >>InputBox function.
    >>
    >>- Jim
    >>
    >>"Tim Martin" <tpmartin@bigfoot.com> wrote:
    >>>
    >>>Does anyone have a good date and time validation routine or technique

    they
    >>>would like to share?
    >>>When my user needs to add a record to the database, I need him to give

    >the
    >>>date and time for the record. I would like to be able to allow him to

    enter
    >>>the information from an inputbox that I open up in VBA when he clicks

    on
    >>>a button. This means that the user will be entering the date and time

    as
    >>>a string, sort of in a free format. Then the program will have to validate
    >>>what has been entered.



  4. #4
    Jim Pragit Guest

    Re: date / time picker


    Tim,

    Using the DateTimePicker control is very straight forward. Use the Format
    property to select between date and time, and use the MinDate and MaxDate
    properties to restrict the user's input to a specific range.

    BTW, technically, this isn't an API question so if you need more help, try
    posting your question to the vb.general or vb.getting.started newsgroup.

    - Jim

    "Tim Martin" <tpmartin@bigfoot.com> wrote:
    >
    >Jim-
    >Thanks. datetimepicker looks most promising. Now does anyone have any code
    >snipsets to share regarding its use?
    >I need to get the date and time from my user not just the date. I also need
    >to restrict the dates that he can select. And, I am using VBA inside a third
    >party software product,
    >not full VB. Any help would be appreciated.
    >Tim
    >
    >"Jim Pragit" <James.Pragit@BakerNet.com> wrote:
    >>
    >>Tim,
    >>
    >>How free form do you want it? VB provides IsDate and CDate functions.


    >IsDate
    >>and CDate are very flexible and can handle (some) free form input. Test
    >>these to see if they can do what you want.
    >>
    >>As an alternative, you can use the Date/Time picker control instead of

    the
    >>InputBox function.
    >>
    >>- Jim
    >>
    >>"Tim Martin" <tpmartin@bigfoot.com> wrote:
    >>>
    >>>Does anyone have a good date and time validation routine or technique

    they
    >>>would like to share?
    >>>When my user needs to add a record to the database, I need him to give

    >the
    >>>date and time for the record. I would like to be able to allow him to

    enter
    >>>the information from an inputbox that I open up in VBA when he clicks

    on
    >>>a button. This means that the user will be entering the date and time

    as
    >>>a string, sort of in a free format. Then the program will have to validate
    >>>what has been entered.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center