Click here to Skip to main content
15,889,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have retrieved some text from database using sql data reader and assigned it to the asp:label
e.g i have retrieved date time from database using datareader and assigned it to label

now Label.Text= sqlread["DATETIME"];

label.text displays date time as 14/02/2014 11:00:00 a.m.
in a single line now i want to break time and display it in next line pls tell me how to achieve this.
Posted

1 solution

Try this
C#
string ss = "14/02/2014 11:00:00 a.m.";
       string[] array = ss.Split(' ');
       string outp  =  array[0] + "</BR>" + array[1] + array[2];
 
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