Click here to Skip to main content
15,887,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to get Indain Date time Format in Reapter.
I write a syntax for bind Lablel in Reapter
Now It Is showing like this 04/12/2014 02:54:30 PM But i Need 12/04/2014 02:54:30 PM(dd-MM-yyyy hh:MM:ss)

How to i convert it in binding syntax.

C#
<asp:Label ID="Label11" runat="server" Text='<%#Bind("Date") %>'>
Posted
Updated 12-Apr-14 5:27am
v3
Comments
Mahesh@Dev 12-Apr-14 13:37pm    
Plz...Anybody Suggest something.. Its Urgent...
Maciej Los 12-Apr-14 14:20pm    
Have you tried something similar to:
Text='<%# Bind("WeatherDate", "{0:dd-MM-yyyy hh:mm:ss}") %>'
Mahesh@Dev 12-Apr-14 21:43pm    
Thanks Maciej..But Also I want " AM/PM " Here...
Maciej Los 13-Apr-14 5:12am    
Sorry, but you wrote: "i Need 12/04/2014 02:54:30 PM(dd-MM-yyyy hh:MM:ss)"
By The Way, have you tried it?
Mahesh@Dev 13-Apr-14 6:17am    
Everything is right But AM / PM not showing...right Now

1 solution

Try:
ASP.NET
<asp:label id="Label11" runat="server" text="<%#Bind("Date"), "{0:dd-MM-yyyy hh:mm:ss tt}" %>" xmlns:asp="#unknown"></asp:label>


For further information, please see: Custom Date and Time Format Strings[^]
 
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