How do you force a change of time for a datetime field?

Version 1

    Details

    When you select a value in a date/time field, it defaults to 12:00am. This discusses a method that forces users to select a time other than the default value of 12:00am by parsing out the hour and minute and doing a comparison.


    Resolution

     

    By using an IF statement, you can combine this with a 'Validation rule' in a business object to prevent users from saving a default time for a date/time field. This allows users to select the same day, but forces them to change the time in order to save.

    With Datepart, hours are returned 1 to 24

    $(if 
    (
    ToString(DatePart("hour",  ToClientTime(ScheduledStartDate))) == "0" 
    AND 
    ToString(DatePart("minute",  ToClientTime(ScheduledStartDate))) == "0"
    )
      then false
      else true)