C# Tutorial 23: How to use DateTimePicker and save date in Database

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • ★★★Top Online Courses From ProgrammingKnowledge ★★★
    Python Programming Course ➡️ bit.ly/2vsuMaS ⚫️ bit.ly/2GOaeQB
    Java Programming Course ➡️ bit.ly/2GEfQMf ⚫️ bit.ly/2Vvjy4a
    Bash Shell Scripting Course ➡️ bit.ly/2DBVF0C ⚫️ bit.ly/2UM06vF
    Linux Command Line Tutorials ➡️ bit.ly/2IXuil0 ⚫️ bit.ly/2IXukt8
    C Programming Course ➡️ bit.ly/2GQCiD1 ⚫️ bit.ly/2ZGN6ej
    C++ Programming Course ➡️ bit.ly/2V4oEVJ ⚫️ bit.ly/2XMvqMs
    PHP Programming Course ➡️ bit.ly/2XP71WH ⚫️ bit.ly/2vs3od6
    Android Development Course ➡️ bit.ly/2UHih5H ⚫️ bit.ly/2IMhVci
    C# Programming Course ➡️ bit.ly/2Vr7HEl ⚫️ bit.ly/2W6RXTU
    JavaFx Programming Course ➡️ bit.ly/2XMvZWA ⚫️ bit.ly/2V2CoAi
    NodeJs Programming Course ➡️ bit.ly/2GPg7gA ⚫️ bit.ly/2GQYTQ2
    Jenkins Course For Developers and DevOps ➡️ bit.ly/2Wd4l4W ⚫️ bit.ly/2J1B1ug
    Scala Programming Tutorial Course ➡️ bit.ly/2PysyA4 ⚫️ bit.ly/2PCaVj2
    Bootstrap Responsive Web Design Tutorial ➡️ bit.ly/2DFQ2yC ⚫️ bit.ly/2VoJWwH
    MongoDB Tutorial Course ➡️ bit.ly/2LaCJfP ⚫️ bit.ly/2WaI7Ap
    QT C++ GUI Tutorial For Beginners ➡️ bit.ly/2vwqHSZ
    ★★★ Online Courses to learn ★★★
    Get 2 FREE Months of Unlimited Classes from skillshare - skillshare.eqc...
    Data Science - bit.ly/2lD9h5L | bit.ly/2lI8wIl
    Machine Learning - bit.ly/2WGGQpb | bit.ly/2GghLXX
    Artificial Intelligence - bit.ly/2lYqaYx | bit.ly/2NmaPya
    MERN Stack E-Degree Program - bit.ly/2kx2NFe | bit.ly/2lWj4no
    DevOps E-degree - bit.ly/2k1PwUQ | bit.ly/2k8Ypfy
    Data Analytics with R - bit.ly/2lBKqz8 | bit.ly/2lAjos3
    AWS Certification Training - bit.ly/2kmLtTu | bit.ly/2lAkQL1
    Projects in Java - bit.ly/2kzn25d | bit.ly/2lBMffs
    Machine Learning With TensorFlow - bit.ly/2m1z3AF | bit.ly/2lBMhnA
    Angular 8 - Complete Essential Guide - bit.ly/2lYvYRP
    Kotlin Android Development Masterclass - bit.ly/2GcblsI
    Learn iOS Programming Building Advance Projects - bit.ly/2kyX7ue
    ★★★ Follow ★★★
    My Website - www.codebind.com
    DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
    Visual C# .NET Controls The Date Time Picker - Date Picker
    C# - How do I set my datetimepicker date?
    visual C# - DateTimePicker date to string C#
    How to compare the time of a DateTimePicker control and the
    How do I get value from Date time picker and Month calendar C#
    How to pass values to a dateTimePicker control‎ C#
    How to change DateTimePicker control to 24h time format ?
    Getting started with the DateTimePicker
    Visual Studio 2012 RC - Age calculation from
    Converting date time picker value into t_time type
    date time picker‎ - 7 posts
    DateTimePicker - Visual C#
    assign SYSTEMTIME to DateTimePicker Control‎ C#

Komentáře • 89

  • @DrSatti
    @DrSatti Před 11 lety +2

    Your vision will make a great difference in the C Sharp world for a common programmer. Keep up the good work.

  • @wilsonmateo6346
    @wilsonmateo6346 Před 5 měsíci

    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

  • @TheJoker0
    @TheJoker0 Před 8 lety +1

    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???

  • @user-ir7jd1dz5o
    @user-ir7jd1dz5o Před 2 lety +1

    Type of field (DOB) date or vchar??

  • @mrj4082
    @mrj4082 Před 2 lety

    Thank you. Very helpfull despite being almost 9 years old. Appreciate it man 👍

  • @DeniseStack
    @DeniseStack Před 10 lety +2

    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.

    • @NabeelHassanein
      @NabeelHassanein Před 10 lety +1

      In VS C# 2012 Value Does not exists any more so it is done as follows
      dobdatettime.ToString("yyyy-MM-dd");
      Best Regards

    • @josi-iwnl-8920
      @josi-iwnl-8920 Před 6 lety

      thank god

  • @czajla
    @czajla Před 4 měsíci

    spolier: property Format set Custom, this will activate property CustomFormat

  • @sahack7322
    @sahack7322 Před 9 lety

    عااااااااااالی بود. مرررررررررررررررسی.
    it's very good. thank you so much sir. good luck.

  • @AlexMartinez-be2rh
    @AlexMartinez-be2rh Před 10 lety +1

    Thaks very much sir, I was searching for this all day long, MSDN etc. and you have the answer.

  • @bloodymindedchild
    @bloodymindedchild Před 7 lety +7

    "Date of butt" lol
    PS : I like your vids, keep doing !!!

  • @kriegswar6733
    @kriegswar6733 Před rokem

    thank you sir, you solved my problem here

  • @achibelukwando6986
    @achibelukwando6986 Před 11 lety

    learning a lot from your videos and still learning # keep up the good work guy

  • @TamillaS
    @TamillaS Před 9 lety +1

    thank you very much!!! your tutorials are very useful!!!

  • @ashrafzaky
    @ashrafzaky Před 4 lety

    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.

  • @miesen1of4
    @miesen1of4 Před 3 lety

    Thank you , i this was helpfull for my class lab.

  • @snehanaidu5532
    @snehanaidu5532 Před 5 lety

    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

  • @shibleekhan101
    @shibleekhan101 Před 10 lety

    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

  • @rushiayyappa165
    @rushiayyappa165 Před 10 lety

    how can i view the details again in those textboxes ,considering id as primary key,
    how to convert it while retrieving it from database?

  • @naspiroh5152
    @naspiroh5152 Před 2 lety

    Amazing tutorial.. Thanks

  • @sivakumarsivakumar1304

    the datetimepicker nice example

  • @emilioibanez4981
    @emilioibanez4981 Před 2 lety

    Thankyou this helped a lot

  • @saqibsultan9410
    @saqibsultan9410 Před 9 lety +2

    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.

  • @nessiraronialvarez1594

    Thank u very much :') you are beatiful programmer

  • @eddyquintero91
    @eddyquintero91 Před 7 lety +2

    hello, What kind of data do you use in the date field of sql server?

  • @nerodan1763
    @nerodan1763 Před 11 lety

    me han servido de mucho tus vídeos gracias, thanks for uploading your knowledge

  • @fatimashoaib4542
    @fatimashoaib4542 Před 7 lety

    such an amazing one! helped me a lot thank you so much

  • @mohammadtaghipahlavan940

    ok what if i want to read that date i put in DOB in to my app?

  • @ishanmadushanka3709
    @ishanmadushanka3709 Před rokem

    thank you bro

  • @diahdwilestari1052
    @diahdwilestari1052 Před 4 lety

    thank you, this video help me a lot

  • @JunLee000
    @JunLee000 Před 8 lety

    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

  • @NabeelHassanein
    @NabeelHassanein Před 10 lety

    DOB is an abbreviation Date Of Birth and accordingly represent Date field

  • @TormentaJohnny
    @TormentaJohnny Před 10 lety

    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.

  • @melvindelen2518
    @melvindelen2518 Před 6 lety

    Great tutorial. Thanks. Could you help me saving leap year in a database? Many thanks

  • @ShadowDared
    @ShadowDared Před 5 lety

    thanks you very much

  • @heraNbUdDHikA
    @heraNbUdDHikA Před 10 lety +2

    what is the data type of DOB attribute in the database?

    • @ikadoxdell1695
      @ikadoxdell1695 Před 10 lety

      i also need to know that xD

    • @MrCoolbuddy143
      @MrCoolbuddy143 Před 10 lety +1

      Ikado Xdell Heran Buddhika The data type used in DOB is DATETIME.

  • @saurabhbelekar5431
    @saurabhbelekar5431 Před 3 lety

    Thanks bhaii❤🙏

  • @fabiogoncalves3677
    @fabiogoncalves3677 Před 9 lety

    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

  • @abobakersdeeg
    @abobakersdeeg Před 7 lety

    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

  • @HenryDubon23
    @HenryDubon23 Před 6 lety

    Gracias, saludo desde Honduras

  • @sandarusampath7463
    @sandarusampath7463 Před rokem

    Thanks a lot🔥

  • @spaceredx
    @spaceredx Před 2 lety

    Gracias bro

  • @heshanvithanage7357
    @heshanvithanage7357 Před 9 lety +2

    Thanks :-) It's Work

  • @nicador100
    @nicador100 Před 3 lety

    Thanks very much !!!!!!

  • @oddswish9524
    @oddswish9524 Před 5 lety

    Thanks bro.

  • @RadhaKrishna_777
    @RadhaKrishna_777 Před 4 lety

    Thank u 😊

  • @EkambaramPalabindela
    @EkambaramPalabindela Před 10 lety

    Thank You sir....

  • @skybladeyou
    @skybladeyou Před 8 lety

    hi may i know how u make the login page?

  • @MIKEJMTR
    @MIKEJMTR Před 9 lety

    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

  • @bereshdo
    @bereshdo Před 10 lety

    that's good will be succssed

  • @gdragon448
    @gdragon448 Před 5 lety +1

    what is data type in sql server of date?

  • @redcardfordie
    @redcardfordie Před 7 lety

    thank u

  • @joannamaevillamor4270
    @joannamaevillamor4270 Před 4 lety

    How about the code for radio button?

  • @BrunoSouza-jy4rk
    @BrunoSouza-jy4rk Před 8 lety

    help a lot !!!

  • @SrVentor
    @SrVentor Před 6 lety

    Thanks !!!!

  • @abobakersdeeg
    @abobakersdeeg Před 7 lety

    I want a distinguished institute in c# asp.mvc , India. Please detail the title. I will come from outside India

  • @zwggra
    @zwggra Před 11 lety

    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"

  • @abdallahahmed3981
    @abdallahahmed3981 Před 9 lety

    please could anybody tell me how to insert date from date and time picker in MS Access DB ?

    • @vantastic
      @vantastic Před 9 lety +1

      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.

  • @kishorkabadi6551
    @kishorkabadi6551 Před 6 lety

    how to change language of DateTimePicker to Rusian in c#.net

  • @ribvicky
    @ribvicky Před 8 lety +2

    Use parametrized query :-/

  • @coocoonuut49
    @coocoonuut49 Před 9 lety

    thx so much!!!

  • @maran9178
    @maran9178 Před 6 lety

    Awesome

  • @a-maxlee5763
    @a-maxlee5763 Před 11 lety

    May I ask that the data type of attribute "DOB" is what? time or nchar(10)?
    Can any one reply me...Thank you
    ~~

  • @hydrohutechhcm
    @hydrohutechhcm Před 11 lety

    i have a problem but it's done now

  • @guleye
    @guleye Před 5 lety

    do something for your fan

  • @manigopal
    @manigopal Před 11 lety

    how to use this in C# in SQL server 2008

  • @cameronjordan897
    @cameronjordan897 Před 4 lety

    I lov u

  • @kiolerond8926
    @kiolerond8926 Před 8 lety

    can i have a copy of your codes?

  • @gian-lucanardini9706
    @gian-lucanardini9706 Před 8 lety

    mine is creating multiple names

  • @m0ro0n
    @m0ro0n Před 7 lety

    can you send for ,me the source please

  • @wunnell
    @wunnell Před 5 lety

    Any tutorial that teaches people to use string concatenation rather than parameters when saving to a database is a bad tutorial.

  • @youdodle
    @youdodle Před 9 lety

    abudalalalalalala

  • @hebermendozacaballero267

    porque si es aleman el tipo que explica el video, lo programa en inglés, no les basto con perder la guerra? jajaja

  • @selimsacu6387
    @selimsacu6387 Před 5 lety

    Thank you very mach

  • @hakanyldz9013
    @hakanyldz9013 Před 5 lety

    thanks bro