DateTime sql server - sqldataadapter

E

Eric

Hi,

I have a DateTime in one of my table in sql serveur. The format of the
datetime is yyyy-mm-dd. I have an sqladapter in my application
connected with this table and when the format of the date is not
yyyy-mm-dd (on the local computer where my application is running), I
have some problem with the insert/upgrade. My question is: How can I
change the value in the sqldataadapter just before the update?
(because all I display is the hour or the date and the yyyy-mm-dd are
fixed) so I try via the dataset but it doesnt work.
Thanks
 
C

Cor Ligthert

Eric,

The format of the datetime in a SQLserver are ticks accoording to a certain
start time (which I always forget).

When presentated are those translated accoording settings of the
computer/database or the code that is used in the program. (See for that the
overloaded function of ToString() for datetimes. Be so clever to use the
short notations (by instance "d") and not the very hardcoded ones as
"dd:MM:yyyy")

I hope this helps?

Cor
 
E

Eric

Cor Ligthert said:
Eric,

The format of the datetime in a SQLserver are ticks accoording to a certain
start time (which I always forget).

When presentated are those translated accoording settings of the
computer/database or the code that is used in the program. (See for that the
overloaded function of ToString() for datetimes. Be so clever to use the
short notations (by instance "d") and not the very hardcoded ones as
"dd:MM:yyyy")

I hope this helps?

Cor

Yes, thank you.
 

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

Similar Threads

date time formatting 3
DateTime field on DataGrid 2
String to DateTime 1
convert date 1
datetime format 3
Sqldatasource Update 1
WHats wrong with this query? 4
DateTIme help 2

Top