Discussions

Expand all | Collapse all

concatenate a date and a time field to one date/time field

  • 1.  concatenate a date and a time field to one date/time field

    Posted 10-15-2014 18:17

    I have a start event and stop event that is recorded as separate date and time of day fields. I want to be able to calculate duration but need the date as some events start today but end tomorrow.

    I have separate fields to assist in data entry because you can simply type "t" for today in the date field (lovely if there is a shortcut key such as "n" (now) for time - is there?) and then just type the time. In the date/time type field the shortcut "t" doesn't work so you end up having to type MM/DD/YY and HH:MM (and PM if not the default AM).

    If you know of a better faster way - let me know!



  • 2.  RE: concatenate a date and a time field to one date/time field

    Posted 10-15-2014 18:37
    In your formula field for duration (this is untested) you should be able to use:

    ToTimestamp([end date],[end time])-ToTimestamp([beginning date],[beginning time])


  • 3.  RE: concatenate a date and a time field to one date/time field

    Posted 10-15-2014 19:44
    works perfectly - thank you


  • 4.  RE: concatenate a date and a time field to one date/time field

    Posted 10-25-2017 19:27
    I would like to create an auto numbering system on a form which would add my OEM lookup field with the current year and record number to create a unique numbering system.  Any suggestions?


  • 5.  RE: concatenate a date and a time field to one date/time field

    Posted 10-25-2017 19:29
    List("-", ToText(Year([Date Created]),ToText([Record ID#]))


  • 6.  RE: concatenate a date and a time field to one date/time field

    Posted 10-25-2017 19:37
    I received the following error 

    Please check the syntax of your formula. Look for mismatched parentheses, missing quotes, or extra brackets.


  • 7.  RE: concatenate a date and a time field to one date/time field

    Posted 10-25-2017 19:41
    Try this

    List("-", ToText(Year([Date Created])),ToText([Record ID#]))