February 9, 2009 at 5:51 am
im trying to insert a varchar value into a datetime datatype column
'1900-00-00 00:00:00.000'
this is a varchar because im printing out a script.
this is what the statement looks like,but doesnt work
INSERT INTO [AppUserStatus] ([UserID],[UserStatus],[FailedAttempts],[LockOutTime],[PwdGen])
values(94,0,0,'1900-00-00 00:00:00.000',0)
i've tried:
INSERT INTO [AppUserStatus] ([UserID],[UserStatus],[FailedAttempts],[LockOutTime],[PwdGen])
values(94,0,0,cast('1900-00-00 00:00:00.000' as datetime),0)
i've tried:
INSERT INTO [AppUserStatus] ([UserID],[UserStatus],[FailedAttempts],[LockOutTime],[PwdGen])
values(94,0,0,convert(datemtime, '1900-00-00 00:00:00.000', 120),0)
any help? need to get this working asap
February 9, 2009 at 5:55 am
ive sorted it out thanks:w00t:
February 9, 2009 at 6:16 am
I'm assuming your problem was that 1900-00-00 is not a date?
Please let us know what the solution was in case someone else has the same problem in the future 🙂
Thanks
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
February 9, 2009 at 8:09 am
I'm assuming your problem was that 1900-00-00 is not a date?
Suppose the data came from MySQL as this is proprietary to them and does not port.
brgds
Philipp Post
brgds
Philipp Post
February 9, 2009 at 8:23 am
More reason for us to understand what fixed this, for future users
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply