Reporting software I am using pulls in a start and end time from a database into two separate columns. (the data in the database is from a multi-field calculated column.)
In the reporting software (Entrinsik Informer) I want to format the time so that if the start time and end time are both am (or pm), it will shorten the start time to only the hour (no minutes, no :, no AM/PM)
Start time End time 7:00 AM - 11:00 AM
WHAT I WANT after formatting
Start Time End Time 7 - 11:00AM
Likewise if both the start and end are pm timer 1:00pm - 3:00pm should look like 1-3:00pm.
If the start time is am and the end time is a pm, then nothing should occur. 7:00am-1:00pm leave it as is.
//which does what the function i want, but only on the current time not a database stored time value
var d = new Date(); d.getHours()
But does not recognize this formatting:
<html> <head> <title>hello</title> </head> <body> var d = new Date(); d.getHours() </body> </html>
I have read through numerous forums, but none show how to change time from 7:00 AM to 7