473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Databinding DateTime fields

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.
Nov 19 '05 #1
2 1481
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.

"Alejandro Penate-Diaz" wrote:
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.

Nov 19 '05 #2
it worked. thanks!

"Chris Podmore" <Ch**********@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
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.

"Alejandro Penate-Diaz" wrote:
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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Savvas | last post by:
Hi I have date/time fields in database access table and i would like to be able to have the choice to be empty when i click the submit button in my vb.net form. In the click event of the...
2
by: Richard | last post by:
Hi, I have a DateTime picker control on a form. The datetime picker control is data bound to a column in a DataTable. Yes I know about bound DateTime pickers and DBNull and etc. so no troubles...
6
by: eye5600 | last post by:
Is there a cure for the problems using databinding with a DateTimePicker? I find that a) sometimes it works, sometimes it doesn't, and b) it fails silently causing all databinding on the DataSet...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
1
by: Zak Lomakus | last post by:
Hi, From my main page (default.aspx) I am calling another .aspx (e.g. otherpage.aspx) page through Javascript using window.showModalDialog. otherpage.aspx has a databoud control (webchart),...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
7
by: =?Utf-8?B?UGVuIEp1YW4=?= | last post by:
How to define databinding for 'datetime' data type ? ( Xxx = '<%# Bind("Datetime") %>' ) Thank you. Pen
3
by: mesut | last post by:
Hi colleagues, I hope someone have experience with these databinding techniques in aspx... and can explain me the reason? I've got a listview and I would like to fix these #3 problems just to...
2
by: Nathan Sokalski | last post by:
I have a Repeater that uses a DataSource that has multiple fields. When the values of these fields is displayed in the Repeater, there are fields that are used in combination with other fields as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.