Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Concatenation Dates with other text?
- This topic has 9 replies, 3 voices, and was last updated 2 years, 6 months ago by
Brendan.
-
AuthorPosts
-
April 2, 2023 at 9:33 AM #49240
Ronald KroekerParticipantHello;
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 LeuParticipantI 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/calculationCheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksApril 2, 2023 at 12:48 PM #49242
Ronald KroekerParticipantThanks 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 LeuParticipantI assume that the return value for the calculation is set to
Text.I’ve created a simple test where I concatenate a
datefield and atextfield and it works for me:CONCAT(DATE([Date]; "yyyy-MMM-dd");"\n";[Name])Attachments:
You must be logged in to view attached files.Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksApril 2, 2023 at 2:28 PM #49245
Ronald KroekerParticipantDaniel, 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 KroekerParticipantDaniel,
I figured it out with the resources you provided.😊
Thanks againCONCAT(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😉.
-
This reply was modified 2 years, 6 months ago by
Ronald Kroeker.
-
This reply was modified 2 years, 6 months ago by
Ronald Kroeker.
April 2, 2023 at 5:12 PM #49249
Daniel LeuParticipantRonald, great that you got it working! Thank you for letting me know!
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksApril 3, 2023 at 3:28 PM #49271
BrendanKeymasterInstead 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 KroekerParticipantThanks 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
BrendanKeymasterHi Ronald,
It doesn’t matter which you use.
\ris shorthand for theCarriage Returncharacter (in old typewriter speak).\njust means theNewlinecharacter. 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?
-
This reply was modified 2 years, 6 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.