Hi all,
I have such a problem. No usefull info on Internet :(
I have a table with several fields, and some of them are of type Date,
having format "Short Date".
At this time I want to add one new colums of type Date, with with short date
format.
I use ADO.NET. For adding the field I use such code:
MainConn.Execute ("Alter TABLE Table1 add column borndate Date")
Such thing of course specifies no Date format. Should I use smth like
"...add column borndate ShortDate" or smth else?
I would prefer not to use other objects like provided by Access or DAO.
Thanks in advance
Ralph - 16 Jul 2009 14:15 GMT
> Hi all,
>
[quoted text clipped - 13 lines]
>
> Thanks in advance
For dotNet or ADO.Net questions you should post to a newsgroup where people
who use those products normally hang out. This newsgroup is for those who
use 'Classic' VB (VB6 and lower). An appropriate newsgroup for the .Net
Framework development platform might be ...
microsoft.public.dotnet.framework.adonet
For a specific answer you should post there.
Your question however, is typical for first-time users of databases. When
front-end tools offer a "date format" that format is used only as a default
when dates are displayed, the actual 'date' is stored within the database as
single unique datatype. In the case of MSAccess that datatype is a double.
(the integer portion providing the number of days since December 30th, 1899,
and the fractional portion the time of day.)
The documentation supplied with the .Net Framework development package and
your database will contain abundant information on how dates are handled
within your specific problem domain.
hth
-ralph