Forum Discussion
MarkShnier__You
Qrew Legend
6 years agoI think that you will need to come up with your own text formula to preserve the 24 hour format.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------
- BenjaminGolden6 years agoQrew CadetTotally fine, just figured it'd be worth asking since I know QuickBase has a couple of hidden formula functions that someone might know about. I should've probably looked in Uservoice first since there is a suggestion with around 50 votes that asks for 24 hour time in formulas, but it'd be a good thing to see in the future. For now, I used the code snippet I wrote out in the OP and it works for what I need it for so no complaints here.
------------------------------
Benjamin Golden
------------------------------- MikeTamoush3 years agoQrew EliteAnyone ever make a formula for this or figure it out? I could make a formula, but would rather copy/paste if it is already made :)
------------------------------
Mike Tamoush
------------------------------
- MikeTamoush3 years agoQrew EliteNevermind. I just did it. Here it is if anyone needs it. It lost the formatting and i dont have tie to go back and indent everything so it is pretty, but it should work.
var text Orig = ToText([24 Hour Time]);
var text AMPM = Right($Orig," ");
var text Prefix = Left($Orig,":");
var text Suffix = Left(Right($Orig,":")," ");
var text NewPrefix =
If($AMPM = "pm",
If(
$Prefix = "01","13",
$Prefix = "02","14",
$Prefix = "03","15",
$Prefix = "04","16",
$Prefix = "05","17",
$Prefix = "06","18",
$Prefix = "07","19",
$Prefix = "08","20",
$Prefix = "09","21",
$Prefix = "10","22",
$Prefix = "11","23",
$Prefix = "12","12"
),
$AMPM = "am",
If(
$Prefix = "12","00"
),
$Prefix
);
$NewPrefix & ":" & $Suffix
------------------------------
Mike Tamoush
------------------------------