//和历转西历
private string DateTimeTransform(string pDate, string pFormat)
{
CultureInfo vCurrentInfo = new CultureInfo("ja-JP", true);
vCurrentInfo.DateTimeFormat.Calendar = new JapaneseCalendar();
DateTime vCurrentDate = Convert.ToDateTime(pDate, vCurrentInfo.DateTimeFormat);
string vReturnDate = vCurrentDate.ToString(pFormat, DateTimeFormatInfo.InvariantInfo);
return vReturnDate;
}
//西历转和历
private string DateTimeTransform(string pDate, string pFormat)
{
CultureInfo vCurrentInfo = new CultureInfo("ja-JP", true);
vCurrentInfo.DateTimeFormat.Calendar = new JapaneseCalendar();
DateTime vCurrentDate = Convert.ToDateTime(pDate);
string vReturnDate = vCurrentDate.ToString(pFormat, vCurrentInfo.DateTimeFormat);
return vReturnDate;
}
posted on 2008-07-24 16:55
冷风旋 阅读(54)
评论(0) 编辑 收藏 网摘