Skip to main content
ashutoshg0001
October 21, 2021
Question

I want to compare date type value with dateTime type value ,how is it possible?

  • October 21, 2021
  • 2 replies
  • 0 views

Hi i have a dropdown where i am selecting a date value from calendar , I have a date field in cdt with datetime type value .How can i make a comparision?

    2 replies

    stefanhelzle0001
    Brainy
    October 21, 2021

    You can cast a datetime into a date using todate().

    mikes0011
    Brainy
    October 21, 2021

    The exact answer really kinda depends on what you hope to accomplish.  How will a bare date be treated in comparison with a datetime?  If someone compares today's date versus today's date at 2 PM, for instance, should the comparison return tha they're equal, or that the value that's 14 hours after midnight be greater?  Or some other behavior?

    The Expression Guru