Group:  Microsoft Access ยป microsoft.public.access.adp.sqlserver
Thread: Timestamp question

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Timestamp question
"Atlas" <atlaspeak[ at ]my-deja.com> 01.12.2005 13:54:27
I'm discovering now that Timestamp fields aren't dates, but just unique
numbers.
Is that true or in those "unique numbers" there's a date part? Hope so,
'cause I would like, given the timestamp column, select groups of records
modified in a date range...
If this is possible what type of Convert/cast statement must i issue in the
Select?

Thanks


Re: Timestamp question
"giorgio rancati" <giorgio_No_Spalmer_rancati[ at ]tiscali.it> 01.12.2005 17:15:53
Hi Atlas,

In Microsoft Sql Server the timestamp field is a binary data type
----
timestamp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ta-tz_6fn4.asp
----
It doesn't contain date/time information.

bye
--
Giorgio Rancati
[Office Access MVP]

"Atlas" <atlaspeak[ at ]my-deja.com> ha scritto nel messaggio
news:11ou04mc6hmko3a[ at ]news.supernews.com...
[Quoted Text]
> I'm discovering now that Timestamp fields aren't dates, but just unique
> numbers.
> Is that true or in those "unique numbers" there's a date part? Hope so,
> 'cause I would like, given the timestamp column, select groups of records
> modified in a date range...
> If this is possible what type of Convert/cast statement must i issue in
the
> Select?
>
> Thanks
>
>


Re: Timestamp question
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)> 01.12.2005 17:55:46
The Timestamps field is not a datetime field. To do what you want, you have
to add a new column of type datetime or smalldatetime with the following
default value: (getdate()) . The will display the creation date/time for
new records.

After that, you add a trigger that will update this field each time the
record is changed; something like:

CREATE TRIGGER MyTable_ModificationDate
ON dbo.MyTable
FOR UPDATE
AS

Update E
Set ModificationDate = getdate()
From dbo.MyTable T inner join Inserted ins on T.IdKey = ins.IdKey


--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Atlas" <atlaspeak[ at ]my-deja.com> wrote in message
news:11ou04mc6hmko3a[ at ]news.supernews.com...
[Quoted Text]
> I'm discovering now that Timestamp fields aren't dates, but just unique
> numbers.
> Is that true or in those "unique numbers" there's a date part? Hope so,
> 'cause I would like, given the timestamp column, select groups of records
> modified in a date range...
> If this is possible what type of Convert/cast statement must i issue in
> the Select?
>
> Thanks
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net