internal static java.sql.Timestamp ClrTicksToJavaTimestamp(long ticks) { java.sql.Timestamp ts = new java.sql.Timestamp(0); ClrTicksToJavaDate(ts, ticks); // int nanos = (int)(ticks % TimeSpan.TicksPerMillisecond) * 100; // ts.setNanos(javaTimestamp.getNanos() + nanos); return(ts); }
internal static long JavaTimestampToClrTicks(java.sql.Timestamp ts) { long ticks = JavaDateToClrTicks(ts); // Extra ticks, for dbs that can save them. // We do not use it, since .net does not saves ticks for fractial milliseconds // long ticksLessThanMilliseconds = (ts.getNanos()*100) % TimeSpan.TicksPerMillisecond; // ticks += ticksLessThanMilliseconds; return(ticks); }
internal static java.sql.Timestamp ClrTicksToJavaTimestamp(long ticks) { java.sql.Timestamp ts = new java.sql.Timestamp(0); ClrTicksToJavaDate(ts, ticks); // int nanos = (int)(ticks % TimeSpan.TicksPerMillisecond) * 100; // ts.setNanos(javaTimestamp.getNanos() + nanos); return ts; }