Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add time to DateTime field
Message
De
01/08/2022 03:03:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01684744
Message ID:
01684747
Vues:
49
J'aime (1)
>Hello,
>
>I have an INSERT into command where a DateTime column gets a Date without a time. The Date is passed to this method. So, right now, when I look at this column (in SQL Server Management Studio), I see date and all 0 (zeros) for the time. I would like the INSERT to store the current time when this happens.
>How do I do it in code? Here is an example of the INSERT:
>
>	INSERT INTO (cInvenUsedView) ( INVEN_PK, INV_CODE, TRAN_DATE ) VALUES ;
>		( tnInvenPk, cInvCode, tdPostDate  )
>
>
>The value in the above variable tdPostDate is a Date. Can I add the Time right in this SQL Insert?

A minimalistic approach to this would be
	INSERT INTO (cInvenUsedView) ( INVEN_PK, INV_CODE, TRAN_DATE ) VALUES ;
		( tnInvenPk, cInvCode, dtot(tdPostDate)+seconds()  )

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform