Showing posts with label friendsin. Show all posts
Showing posts with label friendsin. Show all posts

Monday, March 19, 2012

Date is not getting saved in propper manner

hi friends

In my form i am storing system's date in the database.

4 that i m using a variable of date like:

dim today as new date

today=now.date

but its storing the default date that is '1/1/1900'

how to overcome this problem?

Hello:

Can you show us some of your code using to perform so?

Regards

|||

Hey,

If you are storing the date for when the row was created, you could set a default value for the date field with the default value of getdate(); this will get the date from the system time. Otherwise, try DateTime.Today instead of using a date variable. From that, you can then use ToString() to convert it to a string, or whatever you want to do with it.