Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!
As the data(one of the column is TDate:DateTime/DataType) is stored in Table. I want to display the TDate in the Format(dd/MM/yyyy).
As I am trying Text='<%# bind("TDate") %>'.

Could anyone please show me the required format?
Posted
Updated 23-Aug-11 3:13am
v2
Comments
LebneizTech 23-Aug-11 9:17am    
The Default Format of DateTime Column in SQL is "2/7/2011 12:00:00 AM" (MM/dd/yyyy).My Requirement is/Required Format (dd/MM/yyyy)

1 solution

You can eithe convert the date in your sql statement, http://www.ehow.com/how_5804915_convert-date-format-transact_sql.html[^] or afterward and prior to databinding using DateTime.ToString("dd/MM/yyyy") or in the binding expression http://msdn.microsoft.com/en-us/library/2d76z3ck.aspx[^]
 
Share this answer
 
v2
Comments
walterhevedeich 23-Aug-11 21:54pm    
Good Advice. My 5.

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