Concatenation Dates with other text?

Viewing 9 reply threads
  • Author
    Posts
  • April 2, 2023 at 9:33 AM #49240

    Ronald Kroeker
    Participant

    Hello;
    I am trying to make a concat formula and one of the variables is a date field. When I run the formula all the data is expressed but the date is showing up as a group of numeric values? I am just wondering if someone has a solution for this which I can use?
    Example:
    CONCAT([Daily Journal::Date];”\r”;[Client Location Information::Client/Location];”\r”;[Client Contacts::Contact])

    Thanks ahead of time.

    April 2, 2023 at 11:39 AM #49241

    Daniel Leu
    Participant

    I think you need to convert the date to a string first. Maybe something like this:

    CONCAT(DATE([Daily Journal::Date];"yyyy-MMM-dd");”\r”;[Client Location Information::Client/Location];”\r”;[Client Contacts::Contact])

    The DATE() function has many options. Please refer to the documentation at https://www.tapforms.com/help-mac/5.3/en/topic/calculation

    April 2, 2023 at 12:48 PM #49242

    Ronald Kroeker
    Participant

    Thanks for the response Daniel. I have tried the suggestion to no avail. I have made another calc field to play with and the number it displays is correct but it seems to need a format change(I can get it to successfully display original field when calc field result is formatted as a date). I am thinking I might have to convert that date field to text first before bringing it into my CONCAT statement.

    April 2, 2023 at 1:04 PM #49243

    Daniel Leu
    Participant

    I assume that the return value for the calculation is set to Text.

    I’ve created a simple test where I concatenate a date field and a text field and it works for me:

    CONCAT(DATE([Date]; "yyyy-MMM-dd");"\n";[Name])

    Attachments:
    You must be logged in to view attached files.
    April 2, 2023 at 2:28 PM #49245

    Ronald Kroeker
    Participant

    Daniel, Thanks for your patience.
    You were correct I had a typo 😔…I had written
    “CONCAT((Date[Date];yyyy-MMM-dd);[Name field])”
    I had bracket in wrong order and forgot quotes.
    Thanks again for the assistance.
    P.S. What is the correct formatting for long date?
    You had used yyyy-MMM-dd but would like to display full date? Haven’t ventured into scripting yet but will once I have finished my transition with tapforms.

    April 2, 2023 at 3:41 PM #49246

    Ronald Kroeker
    Participant

    Daniel,
    I figured it out with the resources you provided.😊
    Thanks again

    CONCAT(Date([Daily Journal::Date];”EEEE, MMMM dd, yyyy”);”\r”;[Client Location Information::Client/Location];”\r”;[Client Contacts::Contact])

    I guess old guys can still learn😉.

    April 2, 2023 at 5:12 PM #49249

    Daniel Leu
    Participant

    Ronald, great that you got it working! Thank you for letting me know!

    April 3, 2023 at 3:28 PM #49271

    Brendan
    Keymaster

    Instead of CONCAT() you can also just add things together with the + sign.

    E.g.

    DATE([Date]; "yyyy-MMM-dd") + "\n" + [Name]

    Just a little easier to read.

    April 3, 2023 at 4:52 PM #49276

    Ronald Kroeker
    Participant

    Thanks for your assistance in training the ‘old guy’ in Alberta(and other interested individuals) Mr Brendan.
    Both you and Daniel have sent me down a rabbit hole of curiosity now though. I previously read a response on another post to use the “\r” to act as a “Carriage Return” in a statement, but I have noticed the use of “\n” to move text to “New Line”? With all respect to individuals I would like to ask; Which is the correct (proper)use when I am needing to have text output on 2 or more lines in Tapforms? I am not looking for an exhaustive explanation and would just like to know relative information.
    Thanks for all time invested in this matter.
    PS Brendan; have you swapped over to a ‘Fat Bike’ or are you a purist? Also, I have been thoroughly enjoying Tapforms and the accompanying learning curve! You have put a smile on my face each day with the program and renewed my pursuit of understanding Database Normalization and how information interacts.
    Thanks again.😊

    April 4, 2023 at 2:07 AM #49281

    Brendan
    Keymaster

    Hi Ronald,

    It doesn’t matter which you use. \r is shorthand for the Carriage Return character (in old typewriter speak). \n just means the Newline character. They both pretty much do the same thing.

    I don’t have a Fat Bike, but I do have a regular mountain bike (Santa Cruz 5010) and an e-bike (Orbea Rise). I’ve managed to get out and ride 3 times this past week. And the end of this week will be really nice so I’ll be sure to be riding every day.

    Maybe one day I’ll get a e-Fat Bike. A friend of mine has the new Norco Bigfoot VLT 1 and it’s really nice.

    Do you ride?

Viewing 9 reply threads

You must be logged in to reply to this topic.