Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 00/00/0000


i want
dropdown month=0;
dropdown day =0;
dropdown year=0000;

the date is already strored in sqldatabase..
Posted

Hi,
Fetch the date from database and store it in string;

C#
string dtime= dbDateTime.toString("dd-MM-yyyy");
//Here dbDateTime will come from database as you are saying

Now split it and save it in an array:
C#
string[] dateTimeSpl=dtime.Split('-');

Now you got your datetime in your format as you want. It's now in array.

This was the simple example. According to your requirement you just explore the usage..
All the best.
--AK
 
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