示例#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);
        }