Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day Programmers,

I would like to ask, how can I include a date picker (Y-m-d) format in my form so that the data can directly saved inside mySQL database.For example I would like the user to
insert the start date and the end date of their service in the company according to their contract.

Thank you in advance for your help and spending your time helping me.
Posted

Not sure about the chosen date picker is either built-in or 3rd party product.

Either case, CultureInfo class can help for auto conversion of the given date format. Below code behind source enables it:
C#
CultureInfo en = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = en;
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900