123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace CommonNetwork_ICE.Util
- {
-
-
-
- public class DateUtil
- {
- public const string DEFAULT_PATTERN = "yyyy-MM-dd HH:mm:ss.fff";
-
-
-
-
-
- public static string getStrOfCurrDate(String pattern)
- {
- DateTime date = DateTime.Now;
- if (pattern == null)
- {
- return date.ToString(DEFAULT_PATTERN);
- }
- return date.ToString(pattern);
- }
- }
- }
|