[thelist] Asp.net late binding date format

Les Lytollis leslytollis at dimensions-corporatewear.co.uk
Thu Nov 11 05:55:53 CST 2004


Hi All

I have a formatting issue that is driving me mad at the moment!

Some dates in the database are held in the format YYYY-MM-dd
And I want to display them all in dd/MM/YYYY.

In my page I have 

<asp:TemplateColumn>
<ItemTemplate>
  <asp:Label 
	ID="lblOrderDate" 
	Runat="server"  
	Text='<%# DataBinder.Eval(Container.DataItem, "[OrderDate]",
"{0:dd/mm/YYYY}") %>'>
  </asp:Label>
</ItemTemplate>
</asp:TemplateColumn>

I have tried all sorts of combinations of formatting but I cannot get it
to display anything other than YYYY-MM-dd

Any help would be appreciated

regards
Les Lytollis
Web Developer 



********************Confidentiality Notice & Disclaimer ***********************
This message, together with any attachments, is for the confidential and exclusive use of the addressee(s).
If you receive it in error, please delete the message and its attachments from your system immediately and notify us by return e-mail.
Do not disclose, copy, circulate or use any information contained in this e-mail.

(1) Whilst we have taken reasonable precautions to ensure that any attachment to this e-mail has been swept for viruses, we cannot accept liability for any damage sustained as a result of software viruses and would advise that you carry out your own virus checks before opening any attachment.
(2) The sender shall remain solely accountable for any statements, representations or opinions that are clearly his or her own and not made in the course of employment.
***********************************************************************************



More information about the thelist mailing list