declare @dateTime datetime2 = SYSDATETIME() declare @dateTimeOffset datetimeoffset = SYSDATETIMEOFFSET() select @dateTime as [CurrentDateTime], @dateTimeOffset as [CurrentDateTimeOffset], CAST(@dateTimeOffset as datetime2) as [DateTime1] select CAST('2023-04-19 15:32:31.2721255 +07:00' as datetime2) -- Output: 2023-04-19 15:32:31.2721255 select CAST('2023-04-19 15:32:31.2721255 +08:00' as datetime2) -- Output: 2023-04-19 15:32:31.2721255 select SWITCHOFFSET('2023-04-19 15:32:31.2721255 +07:00', '+01:00') -- Output: 2023-04-19 09:32:31.2721255 +01:00 select SWITCHOFFSET('2023-04-19 15:32:31.2721255 +08:00', '+01:00') -- Output: 2023-04-19 08:32:31.2721255 +01:00 select CAST(SWITCHOFFSET('2023-04-19 15:32:31.2721255 +07:00', '+01:00') as datetime2) -- Output: 2023-04-19 09:32:31.2721255 select CAST(SWITCHOFFSET('2023-04-19 15:32:31.2721255 +08:00', '+01:00') as datetime2) -- Output: 2023-04-19 08:32:31.2721255
Lập Trình .NET
Thứ Tư, 19 tháng 4, 2023
[SQL Server] Convert DateTimeOffset to DateTime
Thứ Ba, 2 tháng 8, 2022
[SQL Server] Convert DateTime to DateTimeOffset
declare @dateTime datetime2 = SYSDATETIME() declare @dateTimeOffset datetimeoffset = SYSDATETIMEOFFSET() select @dateTime as [CurrentDateTime], @dateTimeOffset as [CurrentDateTimeOffset], CAST(@dateTime as datetimeoffset) as [DateTimeOffset1], TODATETIMEOFFSET(@dateTime, '+07:00') as [DateTimeOffset2], TODATETIMEOFFSET(@dateTime, RIGHT(SYSDATETIMEOFFSET(), 6)) as [DateTimeOffset3]
Chủ Nhật, 24 tháng 7, 2022
[C#] StringBuilder Internals
Using the StringBuilder Class in .NET | Microsoft Docs
Manipulating C# Strings with StringBuilder | CodeGuru.com
https://referencesource.microsoft.com/#mscorlib/system/text/stringbuilder.cs
https://source.dot.net/#System.Private.CoreLib/StringBuilder.cs
Chủ Nhật, 17 tháng 7, 2022
Thứ Ba, 7 tháng 9, 2021
[C#] The request was aborted: Could not create SSL/TLS secure channel
- Create tls-ssl-settings.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319] "SystemDefaultTlsVersions"=dword:00000001 "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SystemDefaultTlsVersions"=dword:00000001 "SchUseStrongCrypto"=dword:00000001- Execute the reg file.
- Done.
Links:
Chủ Nhật, 22 tháng 8, 2021
[Windows] Configuring FTP Server
https://www.c-sharpcorner.com/article/configuring-ftp-server-in-microsoft-azure/
https://docs.microsoft.com/en-us/samples/azure-samples/sftp-creation-template/sftp-on-azure/
https://cloudinfrastructureservices.co.uk/how-to-setup-ftp-server-using-azure-file-share/
https://charbelnemnom.com/how-to-deploy-sftp-service-on-microsoft-azure/
Thứ Bảy, 21 tháng 8, 2021
Đăng ký:
Bài đăng
(
Atom
)