Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4295 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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)

Posted

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 ; "/" ; "" )

  • Newbies
Posted

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

Posted

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

  • Like 2

This topic is 4295 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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