首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >将"Patient Expired AM-07-2018 6:33 AM“转换为2018-03-07

将"Patient Expired AM-07-2018 6:33 AM“转换为2018-03-07
EN

Stack Overflow用户
提问于 2018-06-08 05:34:43
回答 1查看 34关注 0票数 0

如何在SQL中将"Patient Expired on Mar-07-2018 6:33 AM“转换为2018-03-07?

EN

回答 1

Stack Overflow用户

发布于 2018-06-08 05:38:56

一个非常简单的方法:

select convert(date, replace(substring(str, 20, 11), '-', ' ')
from (values ('Patient Expired on Mar-07-2018 6:33 AM')) v(str)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50750489

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档