Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Only Date portion of GetDate()
Message
De
22/10/2012 12:49:09
 
 
À
22/10/2012 12:31:03
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01555465
Message ID:
01555467
Vues:
46
>I only need the date portion of GetDate() as I want to insert today's date into a table. What's the best way to do this?
>
>Thanks

Where you want to insert it?
What type is that field?

If the field is date type you don't need to do anything:
DECLARE @Test TABLE (fld Date)
INSERT INTO @Test VALUES (GETDATE())
SELECT * FROM @Test
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform