It is easy to convert the date to the database format by using the Value of the date time object. dobdatettime.Value.ToString("yyyy-MM-dd") This works really well.
thanks for the video mate it is not what i was looking for but great (what i am looking for is how to select the information of date from a datagridview, and make the datetimepicker show it) have tried a lot but nothing works
Thank you, but I have a question when i try to insert date from Visual Basic Project to SQL Server 2008 with windows 7 I use '" & dateTipePiker.Text & "' it works when I use Windows 8 it don't work I tried '" & dateTipePiker.Value & "' and '" & dateTipePiker.Value.Date & "' and still dosen't work What should I do???
BE CAREFULL WHO EVER DO THIS LOAD DATABASE BUTTON DOESNT WORK WITH DATES YOU MUST USE THIS ON LOAD BUTTON : "server=localhost;User Id=root;password=kalaok123;Persist Security Info=True;database=database; Convert Zero Datetime=True"
When i click on date timer then my calendar is not showing that years and months why? Just showing today's date and that same format but other years date are missing what should i do? Please answer
how to write code on dateTimePicker if you want to Display selected row from datagridview to TextBox click event dateTimePicker1.Text = row.Cells["dob"].Value.ToString(); it has error if I try to code like this
when i was trying to store the Picked Date it always send 00 month becuse my formate was dd/mm/yyyy, but it fixed when i changed it to dd/MM/yyyy ... why i must wirte MM not mm ? thanks in advance.
somebody knows can i get a function that returns a inner join queery results using tree layer Architecture. I'm developing and studying with Murach Adonet Book, but i can´t find it.
What can i do if i am not using the the MySQL server. i am using northwind database sample and i add column of DOB in it. when i use the datetimepicker i got the error massage (string or binary data would be truncated.the statement has been terminated.) Can any one help me? Thanks
Hello i am using sql server 2012 so can u tell me what i am suppose to wirite when u write("datasource=localhost;port=3306;username=rot;password=root";) i dont know :3 help
iwant using datetimepaker in sql server iceart column in db sql server type date in form iused datetime packer values datetimepacker1.text or value is errror
Abdallah Ahmed This is a C# tutorial dude, however I'm familiar with VBA so I can hopefully help you. You need to format the value within DatePicker to suit the destination database requirement. If MySql, then the following code will work: dim MySqlDate as String MySqlDate = format(dtpicker.value,"yyyy-mm-dd HH:nn:ss") 'You can remove the time formats if you just need the date itself. then include that string variable into your SQL string and use the runsql function. Something like: Dim MyQuery as String MyQuery = "INSERT into tablename (datefield) VALUES ('" & MySqlDate & "');" DoCmd.RunSql(MyQuery) Not sure if this is what you're after though.
Your vision will make a great difference in the C Sharp world for a common programmer. Keep up the good work.
عااااااااااالی بود. مرررررررررررررررسی.
it's very good. thank you so much sir. good luck.
Thank you. Very helpfull despite being almost 9 years old. Appreciate it man 👍
It is easy to convert the date to the database format by using the Value of the date time object. dobdatettime.Value.ToString("yyyy-MM-dd") This works really well.
In VS C# 2012 Value Does not exists any more so it is done as follows
dobdatettime.ToString("yyyy-MM-dd");
Best Regards
thank god
thank you sir, you solved my problem here
Thaks very much sir, I was searching for this all day long, MSDN etc. and you have the answer.
Amazing tutorial.. Thanks
thank you very much!!! your tutorials are very useful!!!
learning a lot from your videos and still learning # keep up the good work guy
thanks for the video mate it is not what i was looking for but great (what i am looking for is how to select the information of date from a datagridview, and make the datetimepicker show it) have tried a lot but nothing works
Thank you , i this was helpfull for my class lab.
Thankyou this helped a lot
spolier: property Format set Custom, this will activate property CustomFormat
me han servido de mucho tus vídeos gracias, thanks for uploading your knowledge
Thank u very much :') you are beatiful programmer
the datetimepicker nice example
Gracias, saludo desde Honduras
thank you, this video help me a lot
Thanks bhaii❤🙏
"Date of butt" lol
PS : I like your vids, keep doing !!!
Thanks a lot🔥
such an amazing one! helped me a lot thank you so much
Thank you very mach
Type of field (DOB) date or vchar??
I used datetime. It works
Thank you, but I have a question
when i try to insert date from Visual Basic Project to SQL Server 2008 with windows 7 I use '" & dateTipePiker.Text & "' it works when I use Windows 8 it don't work
I tried '" & dateTipePiker.Value & "' and '" & dateTipePiker.Value.Date & "' and still dosen't work
What should I do???
Great tutorial. Thanks. Could you help me saving leap year in a database? Many thanks
Thanks very much !!!!!!
Thanks :-) It's Work
hello, What kind of data do you use in the date field of sql server?
same question
He's using VARCHAR I think, not quite sure tho..
May be date time
Thanks bro.
Gracias bro
Thank You sir....
DOB is an abbreviation Date Of Birth and accordingly represent Date field
that's good will be succssed
Thank u 😊
how can i view the details again in those textboxes ,considering id as primary key,
how to convert it while retrieving it from database?
what is the data type of DOB attribute in the database?
i also need to know that xD
Ikado Xdell Heran Buddhika The data type used in DOB is DATETIME.
BE CAREFULL WHO EVER DO THIS LOAD DATABASE BUTTON DOESNT WORK WITH DATES YOU MUST USE THIS ON LOAD BUTTON :
"server=localhost;User Id=root;password=kalaok123;Persist Security Info=True;database=database; Convert Zero Datetime=True"
thanks bro
When i click on date timer then my calendar is not showing that years and months why? Just showing today's date and that same format but other years date are missing what should i do? Please answer
help a lot !!!
how to write code on dateTimePicker if you want to Display selected row from datagridview to TextBox click event
dateTimePicker1.Text = row.Cells["dob"].Value.ToString(); it has error if I try to code like this
Watch my channel for IT videos
when i was trying to store the Picked Date it always send 00 month becuse my formate was dd/mm/yyyy, but it fixed when i changed it to dd/MM/yyyy ... why i must wirte MM not mm ? thanks in advance.
Thnk's very much sir for this tutorial
I want to asked one thing how can we add a remainder in c#, for example remainder for the date of birth.
thx so much!!!
somebody knows can i get a function that returns a inner join queery results using tree layer Architecture. I'm developing and studying with Murach Adonet Book, but i can´t find it.
Thanks !!!!
thank u
What can i do if i am not using the the MySQL server. i am using northwind database sample and i add column of DOB in it. when i use the datetimepicker i got the error massage (string or binary data would be truncated.the statement has been terminated.) Can any one help me? Thanks
ok what if i want to read that date i put in DOB in to my app?
Hello
i am using sql server 2012 so can u tell me what i am suppose to wirite when u write("datasource=localhost;port=3306;username=rot;password=root";)
i dont know :3 help
Not working!
just save 0000-00-00 00:00:00:00.000000
"Incorrect date time value "12/11/14 0:00:00' for column "DOB" at row 1
hi may i know how u make the login page?
Awesome
I lov u
what is data type in sql server of date?
Datetime
iwant using datetimepaker in sql server iceart column in db sql server type date in form iused datetime packer values datetimepacker1.text or value is errror
How about the code for radio button?
Use parametrized query :-/
do something for your fan
I want a distinguished institute in c# asp.mvc , India. Please detail the title. I will come from outside India
how to change language of DateTimePicker to Rusian in c#.net
can i have a copy of your codes?
please could anybody tell me how to insert date from date and time picker in MS Access DB ?
Abdallah Ahmed This is a C# tutorial dude, however I'm familiar with VBA so I can hopefully help you. You need to format the value within DatePicker to suit the destination database requirement. If MySql, then the following code will work:
dim MySqlDate as String
MySqlDate = format(dtpicker.value,"yyyy-mm-dd HH:nn:ss") 'You can remove the time formats if you just need the date itself.
then include that string variable into your SQL string and use the runsql function. Something like:
Dim MyQuery as String
MyQuery = "INSERT into tablename (datefield) VALUES ('" & MySqlDate & "');"
DoCmd.RunSql(MyQuery)
Not sure if this is what you're after though.
i have a problem but it's done now
May I ask that the data type of attribute "DOB" is what? time or nchar(10)?
Can any one reply me...Thank you
~~
yes I have same doubt
mine is creating multiple names
how to use this in C# in SQL server 2008
can you send for ,me the source please
Any tutorial that teaches people to use string concatenation rather than parameters when saving to a database is a bad tutorial.
abudalalalalalala
porque si es aleman el tipo que explica el video, lo programa en inglés, no les basto con perder la guerra? jajaja
thank you bro
thanks you very much