Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing datetime to the millisecond ?
Message
 
 
À
23/01/2003 08:29:20
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00744572
Message ID:
00744724
Vues:
16
I'm working with Sql2000 and don't see this. What version are you using? What your select would return if you substitute INSERTED_ON with datetime variable with value of GETDATE()? Are you using datetime or smalldatetime data type? The second one doesn't store millisecond portion of the time.

>Sergey, thanks for the reply. When I ran a query using your suggestion and some other techniques I am NOT seeing the millisecond portion of the datetime value.
>
>
>SELECT
>CONVERT(VARCHAR(32), INSERTED_ON, 121) AS cnv_121,
>CONVERT(float, INSERTED_ON) AS float,
>CONVERT(varchar, INSERTED_ON, 109) AS cnv_109
>FROM tbl
>
>cnv_121                   float              cnv_109
>-----------------------   ----------------   --------------------------
>2003-01-22 16:04:33.000   37641.6698263889   Jan 22 2003  4:04:33:000PM
>2003-01-22 16:04:33.000   37641.6698263889   Jan 22 2003  4:04:33:000PM
>2003-01-22 16:04:33.000   37641.6698263889   Jan 22 2003  4:04:33:000PM
>...
>2003-01-22 16:05:02.000   37641.670162037    Jan 22 2003  4:05:02:000PM
>
>
>Any ideas why this would be the case? Hard to believe that every insert happens when the millisecond value is at 000. However, that is the case for all 3,904 rows in this particular table.
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform