• finnfin

    (@finnfin)


    I’ve seen the method format split mentioned here, but was wondering is there a combine method? I have separate date and time fields that I would like to combine into one for calc and conditional purposes. I realize that the simple solution is to just turn the fields into date/time field, but thought I’d see if this is something easily doable first.

Viewing 5 replies - 1 through 5 (of 5 total)
  • iantresman

    (@iantresman)

    I’m pretty sure that something like the following should work:

    [set combinedfield][field myfield] -- [field myfield2][/set]

    Thread Starter finnfin

    (@finnfin)

    Actually just realized the [set] and [get] will do it as well. Thank you!

    Thread Starter finnfin

    (@finnfin)

    Follow up question related to time and date and formatting them. I’m trying to do some basic calculations using time. Like end time - start time to get duration, but having trouble getting any sort of output when doing calc with time, let alone with time and date.

    Is there any sort of proper method of doing that other than splitting everything into smaller chunks like day, month, yeah, hour and minute with set? Gets even trickier if start and end are on different dates.

    Edit: Is there any way to format date and time into a timestamp?

    • This reply was modified 5 years ago by finnfin.
    polarracing

    (@polarracing)

    Format your date field yourself to timestamp. Look at the UNIX format rules.

    Ymd would give you 20210429 from current date. If you need time as well ad the unix vales for time as well.

    Thread Starter finnfin

    (@finnfin)

    Thanks, yeah works fine that way. Is there any way to replace characters in the return value, or prevent certain characters from being displayed?

    I’m creating calendar links and certain characters are problematic for the URLs. Like ‘%’ doesn’t play well with Google Calendar links and should be encoded as %25. Any way to achieve that with just this plugin?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Format combine?’ is closed to new replies.