Formatting gridview column: mm/dd/yy

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

What is the formatstring for mm/dd/yy (gridview column)? I always want it
to be 6 digits. Thanks.
 
string temp = DateTime. Today.ToString("MM/dd/yy",
DateTimeFormatInfo.InvariantInfo);

Christiano Donke said:
you may convert the column into a template field and format de bind...

<asp:label (...) text='<%# format(Eval("Date"),"MM/dd/yy")%>' />

probably there are better ways to do this... but it still works...
 
In the US and some parts of Canada, Kenya and the Philippines, that date
would be interpreted as 3 February 2004.
True. But this website is for US people only. ;)
 
Mark Rae said:
And US people aren't interested in Y2k compliance - fair enough...

LOL good one! ;)

The dates will be only from 2008 forward. It's ok. Thanks. :)
 
Back
Top