本文介绍了Java等效于.NET的DateTime.Parse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用一个我将与Pervasive Data Profiler一起使用的java类,需要检查Date String是否可以与.NET的DateTime.Parse一起使用。
有没有相当的类或第三方库可以给我这个功能非常接近.NET的DateTime.Parse?
我需要它能够处理广泛的日期格式。 ex。 12/20/2008,1/1/08,5/10/2009 12:46:00 AM,5/10/2009 17:46:00
解决方案请参阅 parse 方法在 DateFormat 类。这是一个示例
DateFormat df = new SimpleDateFormat(yyyy-MM-dd); 日期date = df.parse(2001-01-01);
I'm working on a java class that I will use with Pervasive Data Profiler that needs to check if a Date String will work with .NET's DateTime.Parse.
Is there an equivalent class or 3rd party library that can give me this functionality that is very close to .NET's DateTime.Parse?
I would need it to be able to handle a broad range of date formats. ex. "12/20/2008", "1/1/08", "5/10/2009 12:46:00 AM", "5/10/2009 17:46:00"
解决方案See parse method in DateFormat Class. Here is a sample
DateFormat df = new SimpleDateFormat ("yyyy-MM-dd"); Date date = df.parse("2001-01-01");
更多推荐
Java等效于.NET的DateTime.Parse?
发布评论