CSharp examples for System:DateTime Time
Is Time by regex
using System.Globalization; using System.Text.RegularExpressions; using System.Web; using System.Linq; using System.Collections.Generic; using System;/*from w ww . j a va2 s .c o m*/ public class Main{ public static bool IsTime(string timeval) { return Regex.IsMatch(timeval, @"^((([0-1]?[0-9])|(2[0-3])):([0-5]?[0-9])(:[0-5]?[0-9])?)$"); } }