Newbies Bill M Posted May 5, 2003 Newbies Posted May 5, 2003 I need to have a calculation field display text and a time stamp. The calculation field I have created works fine for AM times but not PM times. The PM times always display in 24 hour clock format. How can I change this. I swear I have done everything right...please ...prove me wrong. Bill
cjaeger Posted May 6, 2003 Posted May 6, 2003 if (hour(timefield) is >12,hour(timefield)-12&":"&minute(timefield)&":"&seconds(timefield) & " PM", hour(timefield)-12&":"&minute(timefield)&":"&seconds(timefield) & " AM")
Newbies Bill M Posted May 7, 2003 Author Newbies Posted May 7, 2003 Christian, Thanks very much! Works well except that it no longer displays "on the hour" times with two 0s, ie, 6:00 pm is now displayed 6:0 PM. Also, since I just cut and pasted your solution I don't really have an understanding of how it worked. Why is this process seemingly so un-intuitive? Bill Milhoan Case Western Reserve University Cleveland, OH
Korky Posted May 12, 2003 Posted May 12, 2003 I infer that you have a time field and a text field (into which you type) and that they are concatenated in a calculated field. Instead of using a calculated field, try creating a text block and lay a second instance of your time field on top in the upper left.To the right of time field, but still within the text box, insert a second instance of your text field as a Merge field (CTRL+M). You can format the time field as you desire. Type directly into the original text field and the text block should look like the calculated field you originally conceived.
RussBaker Posted May 12, 2003 Posted May 12, 2003 Have a look at my "RussCalcs From Oz" sample file in the Samples Section of this forum, under the topic "Handy Bits". Click on the Views column header and it will be close to the top. Make sure you scroll down towards the bottom of the thread to get the latest version (v4). When you download the file, under the Time tab, there are lots of ways to display what you want.
paulage77 Posted May 16, 2003 Posted May 16, 2003 cjaeger -- why does your calculation subtract 12 even from the AM part. This seems to return negative hours.
cjaeger Posted May 16, 2003 Posted May 16, 2003 >why does your calculation subtract 12 even from the AM part. This seems to return negative hours. because I simply copied and pasted the PM formula. Thanks for pointing out. (Somebody seems to read my post at last ...) Correct formula: if (hour(timefield) is >12,hour(timefield)-12&":"&minute(timefield)&":"&seconds(timefield) & " PM", hour(timefield)&":"&minute(timefield)&":"&seconds(timefield) & " AM")
Recommended Posts
This topic is 7902 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 accountSign in
Already have an account? Sign in here.
Sign In Now