从日,月,年份开始创建新日期 [英] create a new date from day , month,year parts

查看:65
本文介绍了从日,月,年份开始创建新日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,





需要用以下日期时间格式撰写日期





从GETDATE提取()



然后将其加入到月份



所以如果GETDATE() 11/30/2014 哪一天 30



以下必须合并





每月新的日期时间构成

1. 2 2014 02/30/2014 ......

2. 6 2014 06/30/2014。 ....





请提供满足此需求的必要



谢谢

Dear expert,


Need to compose date in datetime format from the following


Extract the day from GETDATE()

and then join it to the Month Year

so if the GETDATE() is 11/30/2014 which has day 30

and the following will have to be combined with


MONTH YEAR NEW DATETIME COMPOSED
1. 2 2014 02/30/2014 ......
2. 6 2014 06/30/2014 .....


Please provide the necessary to achieve this need

Thanks

推荐答案

检查 SQL服务器日期格式 [ ^ ]

你妈您需要使用少量扩展和标准日期时间格式,并将结果合并为一个。
check SQL Server Date Formats[^]
you may need to play with few extended and standard datetime formats and combine the results as one.


这篇关于从日,月,年份开始创建新日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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