Page 1 of 1

Time_RR

Posted: Sat Apr 27, 2002 6:57 pm
by Jimmy_Chiu_(Guest)
Is there a way to change the format for the time parameter. I like to change it to hh:mm:ss am/pm. I know you change it for the time part of a datetime field. Thanks for any help.

=> RE: Time_RR Solution

Posted: Mon Apr 29, 2002 5:59 am
by Assignment Define
>Is there a way to change the format for the time parameter. __>I like to change it to hh:mm:ss am/pm. I know you change it __>for the time part of a datetime field. Thanks for any help.____Unless I am mistaken simply right click the datetime field__and select Properties you will see a dialog with showdate/showtime,__select showtime only (de-select show date) and click on__format box above ^show time^ and select your format option by__clicking on it (ie hh:mm:ss:am)____You can format dates the same way or both together.____Hope this answers your question.__ __:)

=> RE: Time_RR

Posted: Mon Apr 29, 2002 8:12 am
by kfleming
If you are using the TIME() function to return the system time, the alternative calculation might be:____IIF(VAL(LEFT(TIME(),2))>12,str(VAL(LEFT(TIME(),2))-12,2)+subs(time(),3)+" pm",time()+" am")____so instead of seeing 08:14:00 and 14:14:00 you would get__08:14:00 am and 2:14:00 pm____Kathleen__R&R Support

==> RE: Time_RR

Posted: Mon Apr 29, 2002 8:14 am
by kfleming
Somehow a smiley face appears in my last posting instead of the final closing parenthesis that I had originally entered.__You would need to add the ) to have the expression work.____Kathleen__R&R Support

===> RE: Time_RR

Posted: Mon Apr 29, 2002 3:53 pm
by Jimmy_Chiu_(Guest)
Thanks for everyone^s reply. I am not using the datetime field or the time() function. I am using the Time_RR field to display the current time a report is generated. The time always display in military format and I can^t find a way to change the format. When I bring up the property page for this field, I don^t see any place where I can change the format like in the datetime field. Thanks.__

====> RE: Time_RR

Posted: Tue Apr 30, 2002 6:16 am
by kfleming
Time_RR is an automatically generated field that returns a character string. You would need to edit it and change its expression in order to use the am/pm format.____Kathleen__R&R Support

==> RE: Time_RR

Posted: Thu May 02, 2002 12:47 pm
by reshelman
One small correction:____If 24 hour time is 1230, then time is not >12, but still needs to be pm. I just happened to test this around 12:30pm...____I think this will work in all cases:____IIF(VAL(LEFT(TIME(),2))>11, __ IIF(VAL(LEFT(TIME(),2))=12, __ LEFT(time(),5)+"pm", __ str(VAL(LEFT(TIME(),2))-12,2)+subs(time(),3,3)+"pm" ),__LEFT(time(),5)+"am" )____[Also, I am dropping seconds.]____It would definitely be nice to have Time format options similarly to date fields.

===> RE: Time_RR

Posted: Thu May 02, 2002 10:58 pm
by Jimmy_Chiu_(Guest)
Thanks. I^ll try that.__

====> RE: Time_RR

Posted: Fri May 03, 2002 8:35 am
by reshelman
I forgot to mention, I also dropped seconds so on mine time will read in format 12:35pm.