Skip to main content
Question

Displaying Date field dates without dashes

  • Feb 18, 2021 12:26 PM UTC
  • 0 replies
  • 98 views

I want to generate a good that looks like this:

REQ##-YYYYMMDD-######
where
REQ[Record ID#]-[From a Date Field]-[From a number field]
e.g.:
REQ12-20210218-123456

The formula I used in the formula field is: 

"REQ"&[Record ID#]&"-"&ToFormattedText([Date Received],"YYYYMMDD")&"-"&[Source ID]

It displays as:

REQ12-2021-02-18-123456

Close, but I would like to remove the dashes in the date field. How can I do this?



------------------------------
Paul Easton
------------------------------
This topic has been closed for replies.

  • Author
  • Qrew Corporal
  • Feb 18, 2021 1:01 PM UTC
Okay, this is how I got it to work: 

"REQ"&[Record ID#]&"-"&Part(ToFormattedText([Date Received],"YYYYMMDD"),1,"-")&Part(ToFormattedText([Date Received],"YYYYMMDD"),2,"-")&Part(ToFormattedText([Date Received],"YYYYMMDD"),-1,"-")&"-"&[Source ID]


Probably a more elegant way to accomplish this, but this works.

------------------------------
Paul Easton
------------------------------