Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi everyone!

I have a text field which also contains a date. I need to move the date to its own field (ServiceDate) but I'm having trouble pulling it from existing text. I tried using Substitute(Description, " ", "-") to at least separate the description from the date (so I could then pull it easier), but it substitues the three spaces with three dashes crazy.gif I've considered LeftWord, RightWord, Left, Right, and Replace but can't figure out how to handle it. Does anyone have any suggestions?

Existing data is:

W/H 5% LCARE 05/24

MED/ADJ

INS # 67081584 05/30

Pers Check #1751

INS # 2617 07/26

The above data doesn't reflect that there are three spaces between the 'description' and the date. Everything I think of trying, doesn't take into account that the description also has spaces and variable lengths. The date at the end of some fields needs to be moved. Help!!

LaRetta

hi LaRetta,

I'm I missing something obvious here?

What Date????

Existing data is:

W/H 5% LCARE 05/24

MED/ADJ

INS # 67081584 05/30

Pers Check #1751

INS # 2617 07/26

I see what could be three dates, but no years. What date are you referring to, or are you wanting all three dates out?

I think you might be able to pull them out, but I think we need more information on what you want.

Lee

tongue.gif

  • Author

Hi Lee,

Each line listed is a separate record. The date I need to pull is at the end, displayed as 5/24 etc. They all represent year 2002. I hope this helps!

LaRetta

You can do this with one calculation with the result of Text, and two will take the text and make it a date.

See sample attached

Try:

Case(Left(Right(Textfield,3),1) = "/", Right(textfield,5) & "/02","")

  • Author

Hi Razumovsky!!

Oh that worked perfectly, thanks so much! Left(Right ? I'm have to study this one for a bit to figure out WHY it worked, however! confused.gif I appreciate your help very much.

Hi Lee smile.gif

Well, I'm sure your solution would have worked perfectly also; however, I can't figure out how to open .sit files crazy.gif I appreciate you taking the time to respond though!

LaRetta

Hi L.

Right(Textfield,3) returns the last 3 characters in a text field

Left(Right(Textfield,3),1) returns the first character of the last 3

Lee's idea (I believe) was that you would then want to define a second calc field that was texttodate(firstcalc) to convert the info into true date format.

Keep in mind that this is based on the assumption that all your data is in the format of one of the 5 lines you posted. For example, if line 2 was:

MED/AD

the calc would return ED/AD/02

and if the date was embedded in the text (not at the end) you would need a different calc.

Cheers

  • Author

Oh thanks so much for explaining. Yes, I used TextToDate to then convert it. The formulae was perfect. Is there any way of modifying this calc to then 'remove' that same information from the text field?

LaRetta

I think you would use a second calc field:

Case(Left(Right(textfield,3),1) = "/", Left( textfield , Length(textfield)-6 ), textfield)

Left( textfield , Length(textfield)-6 takes 6 characters off the end of the total length of the textfield (5 for the date, 1 for the space preceeding the date).

Cheers

Hi LaRetta,

I believe that Stuffit makes an expander for windows, if not, I pretty sure there are some free utilities out there that will open them.

In the mean time, Here is a zip file.

Lee smile.gif

Right.fp5.zip

  • Author

Hi,

I'm concerned that your suggestion will strip text from fields without a date?? confused.gif

Hi Lee! I downloaded your file - thanks much! I had considered your formulae, but Right(Text, 4) & "/2002" also changes the "MED/ADJ" line to "/ADJ/2002". crazy.gif

LaRetta

That's why you need to have the TextToDate.

Lee

Thats why you have the Case(Left(Right(Textfield,3),1) = "/" part. this only triggers the 6 character removal if there is a "/" as the 3rd to last character, presumably a feature unique to your records with dates at the end of the text.

  • Author

BLESS YOU!! grin.gif That worked great!

LaRetta

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.