9
Contributors
11
Replies
81
Views
6 Years
Discussion Span
Last Post by Rabiya_1
0

you can do like this

datetimepicker.value.date.tostring()
'or you can set format property according to your requirement .

Regards

Edited by M.Waqas Aslam: n/a

0

and if you have datatype datetime in your db , then auto time will be added in your records , this will not effect any thing , and you can perform any task.

Regads

0

and if you have datatype datetime in your db , then auto time will be added in your records , this will not effect any thing , and you can perform any task.

Regads

'ya in mssql2005 datatype is datetime so...but it affect while comparing....
'also using formate property it enter time in database..

Edited by jaimin4829: n/a

0

dateTimePicker1.DataBindings.Add("text", dataGridView1.DataSource, "Ngaysinh");
I try get dd/mm/yyyy from datagridview but datagirdview show mysql: ex: 12/02/1990 12:00:00.
how to show datetimepicker when i click datagridview row

0

I use it simple way. just: datetimepicker.text

but you have to change the format from LONG to CUSTOM

and at CostumFormat use any format you want
dddd-MM-yyyy = 11-4-2015

0

You can use:

Dim startDate as String
startDate = DateTimePicker1.Value.ToString("yyyy/MM/dd")

Or:

Dim startDate as String
startDate = DateTimePicker1.Value.Date
0

change the datatype of startDate from datetime to date in your sql server

This will solve the problem.

Edited by JerrimePatient

0

//orcon is oracle connection
orcon.Open();
OracleCommand c = new OracleCommand();
c.Connection = orcon;
c.CommandText = "insert into xx values('"+dateTimePicker1.Value.ToString()+"')
c.ExecuteNonQuery();

        //in c# im getting error please i need help to insert date in oracle10g
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.