August 15, 200520 yr Hi Guys, I can't seem to figure this one out, it should be simple and I've just spent the last hour friggin' around and getting nowhere (maybe i'll have to downgrade my status to novice). I have a script that inserts the date and time into 2 seperate fields formatted eg. date "Mon, 15 Aug 2005" and "10:35:42 PM" respectively. I have a calculation that concatenates them with some extra text ie. "Last Modified: Date @ Time bla bla. The problem is that although I have used the functions TextToDate(Date)/Time etc... the calculation displays the date and time in the wrong format ie. "Last Modified: 15/08/2005 @ 22:35:42" which is not the format that I want. What the? Please help :bang:
August 15, 200520 yr One among several could be this one: "Last modified: " & DayName ( aDate ) & " " & Day ( aDate ) & " " & MonthName ( aDate ) & " " & Year ( aDate ) & " @ " & Time ( Mod(Hour ( aTime );12) ; Minute ( aTime ) ; Seconds ( aTime ) ) & Case(-1+Int((Hour ( aTime )/12));" AM";" PM") You might exchange the ";" if your OS prefs demands it!! --sd
August 15, 200520 yr Alternatively, if this for display only, type the following directly on the layout: Last Modified: <> @ <> bla bla Select the new text object by clicking on it once, then format the date and time in the same way as you have done for the fields.
August 19, 200520 yr Author Excellent! Thanks very much comment!, that's exactly what I needed. thanx also to Soren. I didn't try that method but I'm sure it would have worked also.
Create an account or sign in to comment