Search notes:

SQL Server function: cast

cast converts a value from one data type to another.
select
  cast('2001-02-03 04:05:06.789' as datetime2) dt,
  cast('23:59'                   as time     ) almost_midnight,
  cast(0x0104                    as integer  ) CCLX,
  cast(0x843f0b                  as date     ) april_8th_2019,
  cast(0x520065006e00e900        as nvarchar ) name,
  cast(0x604f7d59                as nvarchar ) ni_hao
;
--
-- dt                           almost_midnight   CCLX         april_8th_2019 name      ni_hao
-- ---------------------------  ----------------  -----------  -------------- --------  --------
-- 2001-02-03 04:05:06.7890000  23:59:00.0000000  260          2019-04-08     René      你好
Github repository about-MSSQL, path: /t-sql/functions/cast/from-hex-to.sql

See also

The convert() and format functions.
T-SQL functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737533277, '18.117.152.156', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/T-SQL/functions/cast/index(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78