如何在sql server中将yyyy / dd / mm转换为yyyy / mm / dd [英] How convert yyyy/dd/mm to yyyy/mm/dd in sql server

查看:81
本文介绍了如何在sql server中将yyyy / dd / mm转换为yyyy / mm / dd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了你的查询,但是我的约会(yyyy / dd / mm)明智的相同数据再来了,我在处理日期提供了一些数据



ProcessDate( yyyy / dd / mm)此格式低于数据



2014-01-04 00:00:00.000

2014-02-04 00 :00:00.000

2014-03-04 00:00:00.000



但我希望(yyyy / dd / mm)此格式结果是2014-04-01 00:00:00.000((yyyy / dd / mm))



谢谢

解决方案

不要在快速答案下发布 - 如果您从文章中获得了代码,那么该文章底部会有一个新消息按钮,这会导致将电子邮件发送给作者。然后他们会被告知你希望与他们交谈。

在这里发布这个依赖于他们匆匆而过并意识到这是为了他们。



或者,如果这与您现有问题的答案有关,请使用该答案的回复工具直接与相关人员交谈。问题和答案将具有可能对于良好答案必不可少的上下文,


convert(date,Convert(nvarchar(50),convert(date,'2013-01-02') ,105))

I Tried your query but My date fromat(yyyy/dd/mm) wise same data again came, I am provide some data in process date

ProcessDate(yyyy/dd/mm)this format Below Data

2014-01-04 00:00:00.000
2014-02-04 00:00:00.000
2014-03-04 00:00:00.000

But I want (yyyy/dd/mm) this format result is 2014-04-01 00:00:00.000((yyyy/dd/mm))

Thanks

解决方案

Don't post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.

Or, if this is in relation to an answer to an existing question of yours, use the "Reply" facility on that answer to speak to the person involved directly. The question and answer will have context that is probably essential for a good answer,


convert(date,Convert(nvarchar(50),convert(date,'2013-01-02'),105))


这篇关于如何在sql server中将yyyy / dd / mm转换为yyyy / mm / dd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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