chang timestamp format in filemaker

Hi,

Currently I have a time stamp field which displays values like:"29/04/2010 2:20:17 PM"
Can I have a calculations field which shows the timestamp like this: "OrderAck_20100429_22017"

format: OrderAck_YYYYMMDD_HHMMSS


Any help would be greatly appreciated.

Many Thanks

jedi

J3D1-KN1G1-1tAsked:
Who is Participating?
 
jvaldesConnect With a Mentor Commented:
="OrderAck_"&Year(TimeStamp)&Month(TimeStamp)&Day(TimeStamp)&"_"&Hour(TimeStamp)&Minute(TimeStamp)&Seconds(TimeStamp)

You need to be aware that in your method you didn't include zeroes where the numbers have only one digit which will make it difficult to read later. But this is the answer to your question.
0
 
jvaldesCommented:
Here is an example database
Untitled.fp7
0
 
lesouefCommented:
if it is just a matter of displaying it like this wihtout storing it, this can almost be done via custom date formats except for time where the choice if basically with or w/i seconds.
you can get something like this
expression20100429 1145
w/o any calc.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
J3D1-KN1G1-1tAuthor Commented:
Thanks for all the responses.

I used the this method:
="OrderAck_"&Year(TimeStamp)&Month(TimeStamp)&Day(TimeStamp)&"_"&Hour(TimeStamp)&Minute(TimeStamp)&Seconds(TimeStamp)



This works great but is there a way of adding the zero when there is a single digit present as the example in the question? do I have change the time stamp field?

so far i'm getting this:
29/04/2010 2:20:17 PM => OrderAck_2010429_142017

is it possible to have this OrderAck_20100429_142017 instead?

Many Thanks

Jedi
0
 
lesouefCommented:
yes, for each member which can be a single digit, day and month, you need to add a leading "0", then take the last 2 digits.
for instance the month becomes:
right ("0" & Month(TimeStamp); 2)
I remind that the date display format allows this directly.
0
 
J3D1-KN1G1-1tAuthor Commented:
Hi Thank you for your response

I have this as my calc:
"OrderAck_"&Year(Reciept Timestamp)&("0"&Month(Reciept Timestamp);2)&Day(Reciept Timestamp)&"_"&Hour(Reciept Timestamp)&Minute(Reciept Timestamp)&Seconds(Reciept Timestamp)&".csv"

And i recieve an error "There are more ")" than there are "(" or that there are more "(" than there are ")"
I can seem to find the extra one.
0
 
lesouefConnect With a Mentor Commented:
OrderAck_"&Year(Reciept Timestamp)&right("0"&Month(Reciept Timestamp);2)&Day(Reciept Timestamp)&"_"&Hour(Reciept Timestamp)&Minute(Reciept Timestamp)&Seconds(Reciept Timestamp)&".csv
0
 
J3D1-KN1G1-1tAuthor Commented:
Thanks heaps mate
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.