Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my project date format is 18 02 2015 , but user needs 1 8 0 2 2 0 1 5 like this ,how can i do it , can any one please help me,

Thanks in advance.
Posted

I don't think this is a date format. You have to send this output as a string.
Convert your date into string, manipulate it and create another string with spaces in between every integer.
 
Share this answer
 
Since you have tagged this SQL Server, I take it that you're storing the dates in string format in the database. If that is the case, don't do that. Use date data type in the database and handle all the formatting on the calling side. The database shouldn't typically be used to format the data at all.

What comes to formatting the date into the required format, use the language or tools you have on the client side.
 
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