private static void WriteDateTime(DateTime?dateTime, string myFileName) { BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName); SQLDateTime.Write(writer, dateTime); writer.Close(); }
/** * Method declaration * * * @param d * * @return */ public static int dayofweek(SQLDateTime d) { return d.Value.DayOfWeek; }
/** * Method declaration * * * @param d * @param part * * @return */ // private static int getDateTimePart(SQLDateTime d, int part) // { // Calendar c = new GregorianCalendar(); // c.setTime(d); // return c.get(part); // } /** * Method declaration * * * @param d * * @return */ public static int dayofmonth(SQLDateTime d) { return d.Value.Day; }
/** * Method declaration * * * @param d * * @return */ public static string dayname(SQLDateTime d) { return d.ToString(); }
/** * Method declaration * * * @param d * * @return */ public static string dayname(SQLDateTime d) { return(d.ToString()); }
/** * Method declaration * * * @param d * * @return */ public static int second(SQLDateTime d) { return d.Value.Second; }
/** * Method declaration * * * @param d * * @return */ public static string monthname(SQLDateTime d) { return d.Value.Format("MMMM",null); }
/** * Method declaration * * * @param t * * @return */ public static int minute(SQLDateTime t) { return t.Value.Minute; }
/** * Method declaration * * * @param d * * @return */ public static int month(SQLDateTime d) { return(d.Value.Month); }
/** * Method declaration * * * @param t * * @return */ public static int minute(SQLDateTime t) { return(t.Value.Minute); }
/** * Method declaration * * * @param t * * @return */ public static int hour(SQLDateTime t) { return(t.Value.Hour); }
/** * Method declaration * * * @param d * * @return */ public static int dayofyear(SQLDateTime d) { return(d.Value.DayOfYear); }
/** * Method declaration * * * @param d * * @return */ public static int dayofweek(SQLDateTime d) { return(d.Value.DayOfWeek); }
/** * Method declaration * * * @param d * @param part * * @return */ // private static int getDateTimePart(SQLDateTime d, int part) // { // Calendar c = new GregorianCalendar(); // c.setTime(d); // return c.get(part); // } /** * Method declaration * * * @param d * * @return */ public static int dayofmonth(SQLDateTime d) { return(d.Value.Day); }
/** * Method declaration * * * @param d * * @return */ public static int dayofyear(SQLDateTime d) { return d.Value.DayOfYear; }
/** * Method declaration * * * @param t * * @return */ public static int hour(SQLDateTime t) { return t.Value.Hour; }
/** * Method declaration * * * @param d * * @return */ public static string monthname(SQLDateTime d) { return(d.Value.Format("MMMM", null)); }
/** * Method declaration * * * @param d * * @return */ public static int month(SQLDateTime d) { return d.Value.Month; }
/** * Method declaration * * * @param d * * @return */ public static int quarter(SQLDateTime d) { return((d.Value.Month / 3) + 1); }
/** * Method declaration * * * @param d * * @return */ public static int quarter(SQLDateTime d) { return (d.Value.Month / 3) + 1; }
/** * Method declaration * * * @param d * * @return */ public static int second(SQLDateTime d) { return(d.Value.Second); }
/** * Method declaration * * * @param d * * @return */ // public static int week(SQLDateTime d) // { // return getDateTimePart(d, Calendar.WEEK_OF_YEAR); // } /** * Method declaration * * * @param d * * @return */ public static int year(SQLDateTime d) { return d.Value.Year; }
/** * Method declaration * * * @param d * * @return */ // public static int week(SQLDateTime d) // { // return getDateTimePart(d, Calendar.WEEK_OF_YEAR); // } /** * Method declaration * * * @param d * * @return */ public static int year(SQLDateTime d) { return(d.Value.Year); }