static bool IsDateTime(object Expression)

来源(www.asm32.net)

static bool IsDateTime(object Expression){...}
    // IsDateTime Function
    static bool IsDateTime(object Expression) {
        bool isDateTime;
        DateTime retDateTime;

        isDateTime = DateTime.TryParse(Convert.ToString(Expression),
                System.Globalization.DateTimeFormatInfo.InvariantInfo,
                System.Globalization.DateTimeStyles.AssumeUniversal,
                // AdjustToUniversal(本地时间) AssumeUniversal(本地时间+8)
                out retDateTime );
        return isDateTime;
    }

Link: http://www.asm32.net/article_details.aspx?id=4413


浏览次数 67 发布时间 2009-02-11 18:38:16 从属分类 asp.net(C#) 【评论】【 】【打印】【关闭
 
| www.asm32.net | 2006版 | 资料中心 | linux | asm/asm32 | C/C++ | VC++ | java | Python | 书签 | ASP.Net书签 | 京ICP备09029108号-1