Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, Is there anyway to set the f

Status
Not open for further replies.

ami7

Programmer
Oct 3, 2002
48
GB
Hi,

Is there anyway to set the format value in property builder of a Datgrid control??

I have a datgrid control which is bound to a dataset.
For one of the field in the datagrid i want to set the format to be dd/mm/yy.
There is a Data Formatting Expression option in Property Builder but i don't know to how to specify a value in that?

Is there any other way to set this???
for eg: i have a Date field which basically display date and time.Want to format this to dd/mm/yy when it shows the output in my Datagrid control.


Thanks in advance.
ami.
 
You can use
{0:dd/mm/yy}
in the data formatting expression. That should do the trick.
 
Hi,

Thanks for your reply.
If i specify {0:dd/mm/yy} it diplays the date as follows:
17/00/02

the mm is replaced with 00..

how to resolve this?

Rgds,
ami.
 
Try using {0:dd/MM/yy}.

In a format string, the case means a lot.
-> m or mm stands for minutes
-> M or MM stands for months.

Hope this resolves your problem.
NetAngel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top