Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of date substitution letter function in python

Shulou Source: shulou.com Published: 2022-06-03 11:35:30 10月24日 Update

What this article shares to you is the example analysis of the date replacement letter function in python. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Replace some dates of the month with letters.

CREATE FUNCTION [dbo]. [fn_Date_Arg]

(

@ key NVARCHAR (10)

)

RETURNS VARCHAR (10)

AS

BEGIN

DECLARE @ code VARCHAR (10)

SET @ code=case

When @ key='01' then'1'

When @ key='02' then'2'

When @ key='03' then'3'

When @ key='04' then'4'

When @ key='05' then'5'

When @ key='06' then'6'

When @ key='07' then'7'

When @ key='08' then'8'

When @ key='09' then'9'

When @ key='10' then 'A'

When @ key='11' then'B'

When @ key='12' then 'C'

When @ key='13' then 'D'

When @ key='14' then 'E'

When @ key='15' then 'F'

When @ key='16' then 'G'

When @ key='17' then 'H'

When @ key='18' then 'i'

When @ key='19' then'J'

When @ key='20' then 'K'

When @ key='21' then 'L'

When @ key='22' then 'M'

When @ key='23' then 'N'

When @ key='24' then'O'

When @ key='25' then 'P'

When @ key='26' then'Q'

When @ key='27' then 'R'

When @ key='28' then 'S'

When @ key='29' then 'T'

When @ key='30' then 'U'

When @ key='31' then'V'

Else''end

RETURN @ code

The above is the example analysis of the date substitution letter function in python. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Letters dates functions examples analysis more knowledge articles practical that is work meetings articles look knowledge points industry details information information channels follow part Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi MySQL Microsoft vpn MariaDB