I'm having a problem to inserting date/time in my database..

In my database have ONE column that consists of DATE and TIME

I want use separate dropdownlist for the HOUR, MINUTE, SECOND and I want to bind it & insert it to a 1 column in database..

I need to combine the DATE and this 3 dropdown and bind it and insert it into database


can anyone help me?? please...
\

Thanks in advance

build a string

dim MyDate as string = "1/1/2008"
Dim MyTime as string = dropdownlist1.selectedvalue & ":" & dropdownlist2.selectedvalue & ":" & dropdownlist3.selectedvalue & " " & dropdownlist4.selectedvalue (AM/PM)

MyDate = MyDate & " " & MyTime

Now insert MyDate into the db.

Hi ericstenson,

Can you how me the code in C# instead of vb??

and my db format for this field is DateTime so cannot convert STRING to DateTime format.

what should I do

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.