需要有关日期格式的帮助 [英] Need help with Date format

查看:78
本文介绍了需要有关日期格式的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在下面的日期中有日期。

I am currently having Date in the below foramt.

2019-01-24 15:14:59.177

我需要以下格式。我怎样才能得到这个? 

I need it in the below format. How can I get this ? 

sami

推荐答案

嗨 

Hi 

不确定这是你喜欢的格式(hh \:..)

not sure is this the Format what you like (hh\:..)

DECLARE @d DATETIME = GETDATE();

选择格式(@d,'dd / MM / yyyy','en-US')AS '日期时间结果'  ,FORMAT(@ d,'dd MMM yyyy HH:mm:ss')AS'自定义数字结果';

如果您需要完整格式,您可以分割日期和时间并添加特殊字符。 

if you Need the full Format you can split the date and time and add the Special char. 


这篇关于需要有关日期格式的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆