silanos_1

Analytics

ad silanors2

2010年5月15日 星期六

[C#]如何 取得當月第一天的日期(How to get the date of the first day of the month)


問題
如何 取得當月第一天的日期



解決方法
///
/// 取得當月第一天的日期
///
public string GetThisMonthFirstDay(DateTime date)
{
    string FirstDay = string.Empty;
    FirstDay = date.ToString("yyyy/MM") + "/01";
    return FirstDay;
}
 

沒有留言:

as silanors3

熱門文章

bloggerads