Class DateConversionUtils

java.lang.Object
org.apache.drill.exec.udfs.DateConversionUtils

public class DateConversionUtils extends Object
  • Constructor Details

    • DateConversionUtils

      public DateConversionUtils()
  • Method Details

    • getDate

      public static final LocalDateTime getDate(LocalDateTime d, String interval)
      This function takes a Java LocalDateTime object, and an interval string and returns the nearest date closets to that time. For instance, if you specified the date as 2018-05-04 and YEAR, the function will return 2018-01-01
      Parameters:
      d - the original datetime before adjustments
      interval - The interval string to deduct from the supplied date
      Returns:
      the modified LocalDateTime