Open fjtello opened 7 years ago
C#: DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss");
SQL: CONVERT(varchar(15), getdate(), 121)
formato varchar ======= ======================= 100 Jan 9 2017 3:23PM 101 01/09/2017 102 2017.01.09 103 09/01/2017 104 09.01.2017 105 09-01-2017 106 09 Jan 2017 107 Jan 09, 2017 108 15:23:56 109 Jan 9 2017 3:23:56 110 01-09-2017 111 2017/01/09 112 20170109 113 09 Jan 2017 15:23:56 114 15:23:56:143 120 2017-01-09 15:23:56 121 2017-01-09 15:23:56.143 126 2017-01-09T15:23:56.143 127 2017-01-09T15:23:56.143
Secuencia completa de formatos tabulado en:
https://www.mssqltips.com/sqlservertip/1145/date-and-time-conversions-using-sql-server/
C#: DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss");
SQL: CONVERT(varchar(15), getdate(), 121)
formato varchar ======= ======================= 100 Jan 9 2017 3:23PM 101 01/09/2017 102 2017.01.09 103 09/01/2017 104 09.01.2017 105 09-01-2017 106 09 Jan 2017 107 Jan 09, 2017 108 15:23:56 109 Jan 9 2017 3:23:56 110 01-09-2017 111 2017/01/09 112 20170109 113 09 Jan 2017 15:23:56 114 15:23:56:143 120 2017-01-09 15:23:56 121 2017-01-09 15:23:56.143 126 2017-01-09T15:23:56.143 127 2017-01-09T15:23:56.143