using System;
using System.Windows.Data;
using System.Globalization;

namespace ScheduledTaskAgentSample
{
    public class DateTimeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is DateTime)
            {
                return ((DateTime)value).ToString("MM.dd.yyyy HH:mm:ss");
            }
            else
            {
                return value;
            }

        }
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
