> I think I will need to use calculations at some point, is there a way
> to pass the Now() value into the datetime field.
Sure, it was possible to pass the result of the dateSerial function, so
why would it not be possible to pass the result of the now() function?
But there is an easier way: use the equivalent T-SQL function. Like
this:
sql = insert into table (datetimefield) values (getdate())"
cn.execute sql,,129
Again, you will not get only time stored. There is no way to store a
time without a date in a datetime field. if you want to store the seed
date so that the time is disassociated with the current date then you
can do something like this:
sql = insert into table (timefield) values (" & _
dateadd(d,datediff(d,getdate(),0),getdate())"
cn.execute sql,,129
> I would have used the timestamp but it isn't available on my SQL
> server.
There is a timestamp datatype in SQL, but, despite its name, it does NOT
store anything to do with time. It's a binary value that is
automatically updated when a row changes and thus identifies a row's
"version". It provides a quick way to determine if a row's contents have
been changed since the last time you retrieved values from that row.

Signature
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
anon - 16 Apr 2008 15:33 GMT
That works brilliantly Bob, thank you so much, hope you have a nice day.
Rob
>> I think I will need to use calculations at some point, is there a way
>> to pass the Now() value into the datetime field.
[quoted text clipped - 24 lines]
> "version". It provides a quick way to determine if a row's contents have
> been changed since the last time you retrieved values from that row.