DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   date problem (http://www.daniweb.com/forums/thread31584.html)

LadyFinger Sep 1st, 2005 3:32 am
date problem
 
hi,
my problem is i want to display date using combo box. user will select da date and it will be save to db. da date will be separate to day, month and year. the main prob is i don't know how to aviod this happen 31/2/2005, don't no how 2 xplain....

anyone can help me?

techniner Sep 1st, 2005 10:48 am
Re: date problem
 
Just setup an input mask or set the field type to a DATE field.

If you mean three sep boxes then thats even easier just say:

Day number must be greater then 0 but less then or = 31 but account for months with 30 days and 28 days etc.

Month > 0 <= 12

Year >= 2005 ??


Not sure what your trying to do exactly.. but its easy to link this up..

You could evn use the CALENDAR option.. popup a calendar let them select a date and populate fields..

or you can fgo the route of... CHOOSE A MONTH

Base don month you get days.... then CHOOSE a Year...

etc etc

LadyFinger Sep 1st, 2005 11:42 pm
Re: date problem
 
that was gd idea, by pop up the calendar. but how can i link it to a textbox to display the date select by the user? should i use datepicker ? xtually wat is da fn of datepicker? thanks 4 your concern.

techniner Sep 2nd, 2005 12:22 am
Re: date problem
 
http://www.vbcodemagician.dk/resources/vcdtp.htm

roof Sep 22nd, 2005 2:55 pm
Re: date problem
 
Use a calendar for this problem

jwshepherd Sep 24th, 2005 6:49 pm
Re: date problem
 
the dtpicker seems to work best for most of my applications.

mnemtsas Sep 27th, 2005 7:38 am
Re: date problem
 
Quote:

Originally Posted by jwshepherd
the dtpicker seems to work best for most of my applications.

I'll second that.

nasir1149 Mar 31st, 2008 12:46 am
Re: date problem
 
Can some one help me with the following. Any help will be appriciated.

Platfprm : Visual Studio 2005, Visual Basic

Situation : I have datepicker created in JAVA and call in Visual Basic .net program.

User Pick date and populate to text box.

And click save to SQL 2005 database as date fileld.

My problem is that how to convert date picker date(which is in text box) and save to database

Pls. give me code sample.

NK

choudhuryshouvi Mar 31st, 2008 5:27 am
Re: date problem
 
Quote:

Originally Posted by nasir1149 (Post 572912)

My problem is that how to convert date picker date(which is in text box) and save to database

use Convert.DateTime(Textbox1.text)

or

CDate(Textbox1.text)

debasisdas Mar 31st, 2008 6:24 am
Re: date problem
 
Quote:

Originally Posted by nasir1149 (Post 572912)
Can some one help me with the following. Any help will be appriciated.

Platfprm : Visual Studio 2005, Visual Basic

...........
..................
........................

NK

Please do not hijack others threads .
Start a thread of your own instead for fresh discussions.


All times are GMT -4. The time now is 3:30 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC