strange date 12-30-1899 shown

  • Thread starter Thread starter Lurc
  • Start date Start date
L

Lurc

Hi all,

One field of Access table is date/time type, and format is long time.

In VB.NET, as this table linked to a datagrid, a strange date 12-30-1899 is
shown instead of the time expected. What should I do to let it show time
only?

Thanks.
 
Lurc said:
One field of Access table is date/time type, and format is long
time.

In VB.NET, as this table linked to a datagrid, a strange date
12-30-1899 is shown instead of the time expected. What should I do to
let it show time only?

12/30/1899 is the date stored in the database field. Access doesn't show the
date, the Datagrid does.

Set the Format property of the DatagridTextboxcolumn object in the
Datagrid's tablestyle.


See the paragraph "To format the text of a column..." @
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsDataGridClassTopic.asp

Maybe also:
http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskFormattingtheDataGridAtDesignTime.asp

Armin
 

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

Back
Top