Time_RR
- 
				Jimmy_Chiu_(Guest)
- Posts: 12
- Joined: Tue Oct 10, 2017 12:44 pm
Time_RR
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
>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
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
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
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
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
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
Thanks.  I^ll try that.__
			
									
									
						====> RE: Time_RR
I forgot to mention, I also dropped seconds so on mine time will read in format 12:35pm.