CAMBIAR EL FORMATO DE LA
FECHA EN SQL SERVER
Con el SET DATEFORMAT:
use master
go
create database prueba
go
use prueba
go
create table libro
(
codlibro char(4)not null primary key,
libro varchar(100) not null,
fecha_edi date
)
go
-- Set date format to day/month/year.
SET DATEFORMAT dmy;
GO
DECLARE @datevar datetime2 = '15/01/2008';
SELECT @datevar;
GO
insert into libro values ('l001','Curiosidades Online','15/04/2015')
go
No hay comentarios.:
Publicar un comentario
Gracias por participar ..!!