Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of date substitution letter function in python

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report