如何添加周 [英] How to add Weeks

查看:55
本文介绍了如何添加周的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要从Date.please help..i添加几周才能添加月份,我的示例代码工作正常。同样喜欢我想添加Wees请帮助

i need to add weeks from Date.please help..i can add month my sample code is working fine. same like i want add Wees please help

DateTime  six;
            
            six = DateTime.Now.AddMonths(6);
            if (rb_6months.Checked)
            {
                txt_DisplayDate.Text = "" + six;
            }




推荐答案

也许您应该使用 AddDays(周* 7)


这篇关于如何添加周的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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