Formatting gridview column: mm/dd/yy

B

Bobby Edward

What is the formatstring for mm/dd/yy (gridview column)? I always want it
to be 6 digits. Thanks.
 
S

Spider

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...
 
B

Bobby Edward

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. ;)
 
B

Bobby Edward

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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top