Skip 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.

how to convert a date from another field into a true number (or text) to appear somewhere else?

Featured Replies

  • Newbies

hello,

 

i hope someone can help me with this. I am creating a field that is a concatenation calculation, the purpose of which is to combine multiple pieces of information into a unique number that will be used on our contracts. One of the pieces of information to be included is the date of the contract. I am picking that up from a Creation Date field and trying to GetAsText so it will appear in the concatenated number as just a string of digits (say, 021513.) Currently that is how I've formatted it to appear in the Creation Date field. But when it gets picked up, even with GetAsText, the date formatting returns" 02/15/13."

 

Here is what the concatenation calculation looks like so far:

Contract Number_Company Code &  "-"  &  Contract Number_Department Code  &  "-" & GetAsText ( Contract Number_Date record created ) &"-"& Contract Number_Sequential Component

 

I tried setting the Calculation result to text and still the date appears as 02/15/13.

 

What do I need to do to change the date into a simple string of numbers that is the same as the date but without the date formatting?

 

I'm baffled!

 

Thanks!

 

jmm

See help for date functions:

 

http://www.filemaker.com/12help/html/func_ref1.31.17.html#1028277

 

The various parts of a date can be extracted separately.

 

So for instance to get a date in YYYYMMDD format:

 

Year(  Contract Number_Date record created ) & right( "00" & month(  Contract Number_Date record created); 2) & right( "00" & day(  Contract Number_Date record created); 2)

What will the id be used for? If this is for a relationship, if so, in v10 it is better to use the Auto Enter Serial Number.

 

Try either 

Filter ( date ; "0123456789" )

or

 

Substitute ( date ; "/" ; "" )

  • Author
  • Newbies

Thanks! The link Martie provided worked - except for the fact I am trying to get MMDDYY and what I got was MMDDYYYY. Apparently that is the numbering system preferred by our corporate office. (This is all to create an auto-generated number for contracts.(A unique number but not serving as a unique identifier in the database, though.)

 

Any thoughts on how to get it to include only the last two digits of the year? (I am not all that experienced at calculations.)

 

Thanks in advance!

 

jmm

Right ( "00" & Day ( date ) ; 2 ) & Right ( "00" & Month ( date ) ; 2 ) & Right ( Year ( date ) ; 2 )

 

 

2/19/2013 to 190213

 

Right ( "00" & Month ( date ) ; 2 )   &  Right ( "00" & Day ( date ) ; 2 ) &  Right ( Year ( date ) ; 2 )

 

2/19/2013 to 021913

  • Author
  • Newbies

Thanks so much, Lee!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.