public static long ticksWithDateSetTo ( long ticks , int date ) { int oldDays = ticksToDate ( ticks ) ; return ticks - ( oldDays * MILLIS_PER_DAY ) + ( date * MILLIS_PER_DAY ) ; }
Sets the date component of the timestamp returning the new timestamp with updated component .