Databinding DateTime fields

  • Thread starter Alejandro Penate-Diaz
  • Start date
A

Alejandro Penate-Diaz

Hi. I am binding a datagrid to a sql table that has a DateTime field, this
DateTIme field only has information about date and not about time, but my
datagrid shows date and time and the time is always 12:00:00 AM. How can I
remove this wrong time from my datagrid?
Thanks,
Alejandro.
 
G

Guest

Within the column properties there is "Data Formatting Expression", try
setting it so something like {0:d} or {0:dd/MM/yyyy}

Hope this helps.
Chris.
 
A

Alejandro Penate-Diaz

it worked. thanks!

Chris Podmore said:
Within the column properties there is "Data Formatting Expression", try
setting it so something like {0:d} or {0:dd/MM/yyyy}

Hope this helps.
Chris.
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top