20240301_JSEQ_upperpc/JiangsuEarthquakeNow/JiangsuEarthquake/Common/DateTimeConverter.cs
XuMin 3b6c570800 1 经过电控腔测试和升压站测试;
2 解决了后一个通信连接会影响前一个通信连接的问题;
3 测试过程中存在的问题修改;
2024-09-03 16:30:34 +08:00

29 lines
810 B
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace JiangsuEarthquake.Common
{
public class DateTimeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime dateTime)
{
// 使用自定义的时间格式,例如:"yyyy-MM-dd HH:mm:ss"
return dateTime.ToString("yyyy/MM/dd");
}
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}