hi, I have a problem to convert string to Datetime format and insert into informix database..

my code:

Dim strDate As String ="31/01/2012"

i want convert into datetime and insert into database with format:"31/01/2012 12:30 PM"

anyone can help me to fix this...

hi ..

try this

string a = "12/3/2012 12:00 PM";
        DateTime dt = DateTime.Parse(a);
        Response.Write(dt.ToString("yyyy-MM-dd HH:mm tt"));
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.