clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1044250 fiddles created (9453 in the last week).

CREATE TABLE dbo.tbltemp(Dia DATETIME);
 hidden batch(es)


INSERT INTO dbo.tbltemp(Dia) VALUES ('20170320'), ('20170321'), ('20170322'), ('20170323');
4 rows affected
 hidden batch(es)


SET Language 'Spanish'; SELECT Dia, LEFT(DATENAME(WEEKDAY,Dia),3) + ' ' + CONVERT(VARCHAR(10),Dia,105) Dia_Formateado FROM dbo.tbltemp;
Dia Dia_Formateado
2017-03-20 00:00:00.000 Lun 20-03-2017
2017-03-21 00:00:00.000 Mar 21-03-2017
2017-03-22 00:00:00.000 Mié 22-03-2017
2017-03-23 00:00:00.000 Jue 23-03-2017
Se cambió la configuración de idioma a Español.
 hidden batch(es)


SET Language 'Spanish'; SELECT Dia, FORMAT(Dia, 'ddd dd-MM-yyyy') Dia_Formateado FROM dbo.tbltemp;
Dia Dia_Formateado
2017-03-20 00:00:00.000 lu. 20-03-2017
2017-03-21 00:00:00.000 ma. 21-03-2017
2017-03-22 00:00:00.000 mi. 22-03-2017
2017-03-23 00:00:00.000 ju. 23-03-2017
Se cambió la configuración de idioma a Español.
 hidden batch(es)