Discussions

Expand all | Collapse all

Concatenating date and text fields into one date/time field

  • 1.  Concatenating date and text fields into one date/time field

    Posted 12-28-2018 23:27
    I am trying to concatenate four fields into one date/time field but struggling with the general syntax.

    I have a [start date] field which is a date field, i have an [hour] field which is text with options 1-12, a [minute] field with options :00, :15, :30, :45, and an [ampm] text field with options for AM/PM. 

    Any idea how to combine these four fields into one date/time formula field??


  • 2.  RE: Concatenating date and text fields into one date/time field

    Posted 12-28-2018 23:36
    Try this

    var TimeOfDay Time = ToTimeOfDay([hour] & [minute] & " " & [ampm]);

    ToTimeStamp([start date], $Time)


  • 3.  RE: Concatenating date and text fields into one date/time field

    Posted 12-28-2018 23:44
    Thank you so much! I had it over complicated but this makes it so simple.