Having never seen v4 in action, I don't know what constraints you have in terms of available functions or even data types, but if you go with a "lowest common denominator" type of approach, the following might work for you.
Assuming that you extract your time (MyTime) as a Character field, build a TimePrefix field:
and a TimeSuffix:
if(val(left(mytime,2))<12," am"," pm")
and a final Time field:
Will that do the trick?
Here is an example of what I am trying to do.
Equip Actual Dispatch Arrive Complete Actual Travel Job Pickup / Comp
ID pickup time time time close time time dispatch / close
AZ256 08:07 07:45 08:07 09:12 09:23 0:22 1:05 -0:22 -0:11
ZA583 10:52 11:38 11:45 12:09 12:10 0:07 0:24 0:45 -0:22
I have my template setup to capture the pickup time and the close time and this information is listed in the table correctly, but when I export the table to a csv file my problem occurs. Since the time is in a field that is only formatted for numbers Excel does not handle it as a time of day and then my calculations in Excel do not work. We have v7 in our office and you can go into field properties and set the field for Date/Time and everything works perfect. I am just trying to do it in v4 because I know that I will never see anything better.
In the Table window, you want to create calculated fields: one for each of the formulas shown above.
Hopefully the functions I used in those formulas exist in v4.
Of course, I had in mind that you would have one time field per record, not the handful in your sample! Yikes.
For the amount of time you might spend on this, you might be better off paying for v9 yourself.
Not to worry. I'm sure that we can work this out one way or other with v4 for you.
Thank you for your suggestions but I just did my reports the old way and at least got my company looking into updating my Monarch. They see that it will cut down on our time dealing with reports allowing me to do other things. Does anyone sell older versions as they move up to newer versions? My time issue is corrected in v7 and I know Monarch is on v9. I would think a lot of v7 disks would be unused since v9 is out and to jump from v4 to v7 would be super for me.
This is what I did for years. Outside on Monarch of course.
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set Date=%%i %%k/%%j/%%l
ECHO Date is %Date%
ECHO Day of Week is "%DayOfWeek%", Month is "%Month%"
ECHO Day is "%Day%", Year is "%Year%"
for /F "tokens=1-3 delims=: " %%m in ('time /t') do (
ECHO time is %time%
Echo hour is "%hour%", min is "%min%"
Those look a lot like what I use!
FOR /F "tokens=1-4 delims=/ " %%a IN ("%DATE%") DO (SET wd=%%a) & (SET mth=%%b) & (SET day=%%c) & (SET yr=%%d)
ECHO Weekday=%wd% / Month=%mth% / Day=%day% / Year=%yr%
ECHO Time %TIME%
FOR /F "tokens=1-4 delims=:. " %%a IN ("%TIME%") DO (SET hr=%%a) & (SET mn=%%b) & (SET sc=%%c) & (SET ms=%%d)
ECHO Hour=%hr% / Minutes=%mn% / Seconds=%sc% / Milliseconds=%ms%
With it, I was able to create my own batch-based delay routine without using 3rd party software.