Use GETDATE() to get the current date and time on the server.

--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


"Frank Dulk" <fdulkbol.com.br> wrote in message
news:#ZxTeJvRDHA.1304TK2MSFTNGP11.phx.gbl...
>
>
>
> I am mounted SP for Insert and Update, one of the fields I record the date
> and schedule of recording of the registration. How do I do to diffuse in
SP
> the date and hour of the server?
>
> he/she/you has an example below as I am mounted my SP:
>
> CREATE PROCEDURE [SP_Insert_B_ASSINAT]
> (
> num_assin numeric(4),
> nom_assin varchar(40),
> nom_crg_assin varchar(25),
> ind_assin varchar(1)
> )
> AS
> INSERT INTO [banco].[dbo].[B_ASSINAT]
> ([num_assin],
> [nom_assin],
> [nom_crg_assin],
> [ind_assin],
> [dat_atualizacao])
> VALUES (
> num_assin,
> nom_assin,
> nom_crg_assin,
> ind_assin,
> DATAHOJE)
> Go
>
>
>
>