Пример #1
0
        private static void WriteDateTime(DateTime?dateTime, string myFileName)
        {
            BinaryWriter writer = BCPTests.CreateBinaryFile(myFileName);

            SQLDateTime.Write(writer, dateTime);

            writer.Close();
        }
Пример #2
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int dayofweek(SQLDateTime d)
 {
     return d.Value.DayOfWeek;
 }
Пример #3
0
 /**
  * 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;
 }
Пример #4
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static string dayname(SQLDateTime d)
 {
     return d.ToString();
 }
Пример #5
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static string dayname(SQLDateTime d)
 {
     return(d.ToString());
 }
Пример #6
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int second(SQLDateTime d)
 {
     return d.Value.Second;
 }
Пример #7
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static string monthname(SQLDateTime d)
 {
     return d.Value.Format("MMMM",null);
 }
Пример #8
0
 /**
  * Method declaration
  *
  *
  * @param t
  *
  * @return
  */
 public static int minute(SQLDateTime t)
 {
     return t.Value.Minute;
 }
Пример #9
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int month(SQLDateTime d)
 {
     return(d.Value.Month);
 }
Пример #10
0
 /**
  * Method declaration
  *
  *
  * @param t
  *
  * @return
  */
 public static int minute(SQLDateTime t)
 {
     return(t.Value.Minute);
 }
Пример #11
0
 /**
  * Method declaration
  *
  *
  * @param t
  *
  * @return
  */
 public static int hour(SQLDateTime t)
 {
     return(t.Value.Hour);
 }
Пример #12
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int dayofyear(SQLDateTime d)
 {
     return(d.Value.DayOfYear);
 }
Пример #13
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int dayofweek(SQLDateTime d)
 {
     return(d.Value.DayOfWeek);
 }
Пример #14
0
        /**
         * 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);
        }
Пример #15
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int dayofyear(SQLDateTime d)
 {
     return d.Value.DayOfYear;
 }
Пример #16
0
 /**
  * Method declaration
  *
  *
  * @param t
  *
  * @return
  */
 public static int hour(SQLDateTime t)
 {
     return t.Value.Hour;
 }
Пример #17
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static string monthname(SQLDateTime d)
 {
     return(d.Value.Format("MMMM", null));
 }
Пример #18
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int month(SQLDateTime d)
 {
     return d.Value.Month;
 }
Пример #19
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int quarter(SQLDateTime d)
 {
     return((d.Value.Month / 3) + 1);
 }
Пример #20
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int quarter(SQLDateTime d)
 {
     return (d.Value.Month / 3) + 1;
 }
Пример #21
0
 /**
  * Method declaration
  *
  *
  * @param d
  *
  * @return
  */
 public static int second(SQLDateTime d)
 {
     return(d.Value.Second);
 }
Пример #22
0
 /**
  * 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;
 }
Пример #23
0
        /**
         * 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);
        }