Is it possible to convert a timestamp to a serial number in FMPA?
e.g convert 1/29/16 4:08 PM to 42398.6728240741
If you don't need the decimal, you can simply use:
GetAsNumber ( Get ( CurrentTimestamp ) )
I use this as a batch number when I do batch processes.
That worked just fine.
When you say serial number, you don't mean for a primary key, do you?
If so, I wouldn't recommend it.. that alone would be very problematic
Thanks for your reply, Steven. In fact, I was planning on concatenating this with another number to create a primary key but I think I’ve decided on a different approach.
I’m importing a spreadsheet with about 5,000 records once a month. The spreadsheet doesn’t have a unique ID and I was going to create one by concatenating two fields that would definitely give me a unique ID.
I could do the concatenation in Excel and import into FMP or I could skip the concatenation and simply serialize when I import. The latter would be easier by a smidgen.
I was hoping that I could replicate the concatenation result in Excel in FMP. I assumed it would be easy but it wasn’t. It made me curious.
Thanks again for your reply.
You may find some of the info in the link below useful, particularly Jeremy Bante's (jbante) UUID function
Key values - Best Practices - FileMaker Coding Standards
Personally, I use the FileMaker function get( UUID )
Retrieving data ...