Time_RR

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Jimmy_Chiu_(Guest)
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

Time_RR

Post by Jimmy_Chiu_(Guest) » Sat Apr 27, 2002 6:57 pm

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.

Assignment Define
Posts: 0
Joined: Wed Mar 28, 2018 3:08 am

=> RE: Time_RR Solution

Post by Assignment Define » Mon Apr 29, 2002 5:59 am

>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.__ __:)

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Time_RR

Post by kfleming » Mon Apr 29, 2002 8:12 am

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Time_RR

Post by kfleming » Mon Apr 29, 2002 8:14 am

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

Jimmy_Chiu_(Guest)
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Time_RR

Post by Jimmy_Chiu_(Guest) » Mon Apr 29, 2002 3:53 pm

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.__

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Time_RR

Post by kfleming » Tue Apr 30, 2002 6:16 am

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

reshelman
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Time_RR

Post by reshelman » Thu May 02, 2002 12:47 pm

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.

Jimmy_Chiu_(Guest)
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Time_RR

Post by Jimmy_Chiu_(Guest) » Thu May 02, 2002 10:58 pm

Thanks. I^ll try that.__

reshelman
Posts: 12
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Time_RR

Post by reshelman » Fri May 03, 2002 8:35 am

I forgot to mention, I also dropped seconds so on mine time will read in format 12:35pm.

Post Reply