zoukankan      html  css  js  c++  java
  • 本周几与当前的年月日

          简单的获取年月日与星期几   

                 string week=string.empty;
                    int day = Convert.ToInt32(DateTime.Now.DayOfWeek);
                    switch (day)
                    {
                        case 1:
                            week = "星期一";
                            break;
                        case 2:
                            week = "星期二";
                            break;
                        case 3:
                            week = "星期三";
                            break;
                        case 4:
                            week = "星期四";
                            break;
                        case 5:
                            week = "星期五";
                            break;
                        case 6:
                            week = "星期六";
                            break;
                        default:
                            week = "星期日";
                            break;
                    }

    年:DateTime.Now.Year.ToString()

    月:DateTime.Now.Month.ToString()

    日:DateTime.Now.Day.ToString()

  • 相关阅读:
    java容器
    利用java mail发送邮件
    利用java mail发送邮件
    hbase java API跟新数据,创建表
    hbase java API跟新数据,创建表
    利用httpclient和mysql模拟搜索引擎
    利用httpclient和mysql模拟搜索引擎
    HBase 官方文档
    HBase 官方文档
    安装yum
  • 原文地址:https://www.cnblogs.com/Jack_G/p/2314158.html
Copyright © 2011-2022 走看看