cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-18488%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EConversione%20del%20formato%20dell'ora%20militare%20(hhmm)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18488%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3EDevo%20convertire%20l'ora%20militare%20nel%20formato%20hhmm%2C%20ad%20esempio%201432%20o%20725%20in%20formato%20hh%3Amm%2C%20ad%20esempio%20dalle%2014%3A32%20alle%207%3A25.%20Esiste%20una%20formula%20semplice%20che%20pu%C3%B2%20effettuare%20la%20conversione%20o%20dovrei%20usare%20uno%20script%20per%20questo%3FGrazie.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-354023%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-354023%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EFunziona!%20Grazie%20mille.%20Ho%20imparato%20tanto%20solo%20guardando%20le%20formule%20che%20hai%20proposto!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353958%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353958%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ELa%20mia%20prima%20domanda%20%C3%A8%2C%20se%20la%20lunghezza%20del%20valore%20dell'ora%20di%20input%20%C3%A8%20inferiore%20a%204%20caratteri%2C%20si%20dovrebbe%20presumere%20che%20manchino%20zeri%20(0)%20dal%20lato%20sinistro%20dell'ora%20militare%3FSe%20questo%20%C3%A8%20il%20caso%2C%20propongo%20la%20soluzione%20di%20seguito%3B%20Riempie%20il%20valore%20con%20zeri%20iniziali%20e%20quindi%20esegue%20la%20conversione.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Estandard%20%3D%20Substr(%20%2200%22%2C%20Length(%20Char(%20%3AMilitary%20)%20)%20-%201%20)%20%7C%7C%0AChar(%20%3AMilitary%20)%3B%0A%0ANum(%20Substr(%20Char(%20%3Astandard%20)%2C%20-2%20)%20)%20*%2060%0A%2BNum(%0A%20Substr(%0A%20%20Char(%20%3Astandard%20)%2C%0A%20%201%2C%0A%20%20(Length(%20Char(%20%3Astandard%20)%20)%20-%202)%0A%20)%0A)%20*%203600%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353954%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353954%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EHo%20tentato%20di%20utilizzare%20questo%20codice%20per%20convertire%20una%20stringa%20in%20un%20formato%20orario%20(hh%3Amm)%3CBR%20%2F%3E%3CBR%20%2F%3E%20Num(%20Substr(%20Char(%20%3AMilitare%20)%2C%20-2%20)%20)%20*%2060%20%2B%20Num(%3CBR%20%2F%3E%20Substr(%20Char(%20%3AMilitary%20)%2C%201%2C%20(Lunghezza(%20Char(%20%3AMilitary%20)%20)%20-%202)%20)%3CBR%20%2F%3E%20)%20*%203600%3CBR%20%2F%3E%3CBR%20%2F%3E%20Tuttavia%2C%20mi%20sono%20reso%20conto%20che%20se%20la%20stringa%20%C3%A8%20composta%20solo%20da%202%20cifre%2C%20non%20verr%C3%A0%20convertita.%20Ad%20esempio%2C%20se%20%C3%A8%2026%2C%20non%20verr%C3%A0%20convertito%20in%2000%3A26.%20Tuttavia%2C%20una%20stringa%20di%203%20cifre%20funziona%20bene%20(100%20diventa%201%3A00)%3CBR%20%2F%3E%3CBR%20%2F%3E%20Com'%C3%A8%20possibile%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353330%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353330%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHo%20pubblicato%20il%20tuo%20codice%2C%20nella%20sezione%20formula%20del%20nuovo%20campo%2C%20ho%20cambiato%20il%20campo%20con%20il%20nome%20della%20colonna%20del%20mio%20set%20di%20dati%20e%20funziona%20perfettamente!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENum(%20Substr(%20Char(%20%3AMilitary%20)%2C%20-2%20)%20)%20*%2060%20%2B%20Num(%0A%20%20%20%20Substr(%20Char(%20%3AMilitary%20)%2C%201%2C%20(Length(%20Char(%20%3AMilitary%20)%20)%20-%202)%20)%0A)%20*%203600%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGrazie%20mille!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353326%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353326%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20Jim%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECome%20uso%20questo%20script%3F%20Quali%20sono%20le%20variabili%20che%20dovevo%20cambiare%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuindi%20il%20nome%20del%20set%20di%20dati%20%C3%A8%20%22transaction_data%22%20e%20il%20nome%20della%20colonna%20che%20risiede%20l'ora%20militare%20%C3%A8%20%22DAY%22%20(transaction_data%3ADAY)%3C%2FP%3E%3CP%3EQuindi%2C%20come%20dovrei%20sostituire%20queste%202%20variabili%20nel%20tuo%20script%20ed%20eseguirle%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScusa%20per%20una%20domanda%20cos%C3%AC%20da%20niubbo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-34140%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-34140%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EChe%20ne%20dici%20di%20convertire%20dal%20tempo%20militare%20al%20normale%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-18493%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18493%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAncora%20un%20altro%20approccio%20che%20evita%20del%20tutto%20le%20stringhe%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200px%3B%20font-size%3A%2014px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Courier%3B%20color%3A%20%23011993%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20New%20Column(%20%22time%22%2C%0A%20%20%20%20Numeric%2C%0A%20%20%20%20%22Continuous%22%2C%0A%20%20%20%20Format(%20%22hr%3Am%22%2C%2012%20)%2C%0A%20%20%20%20Formula(%20Floor(%20%3AMilitary%20%2F%20100%20)%20*%203600%20%2B%20Mod(%20%3AMilitary%2C%20100%20)%20*%2060%20)%0A)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%20style%3D%22margin%3A%200px%3B%20font-size%3A%2014px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Courier%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-18492%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhmm)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18492%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EJim%2C%20la%20tua%20soluzione%20ha%20funzionato%20perfettamente.%20Mi%20piace%20come%20tutto%20sia%20rimasto%20nella%20forma%20numerica.%20Grazie%20mille!%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20__jive_emoticon_name%3D%22cool%22%20__jive_macro_name%3D%22emoticon%22%20class%3D%22jive_emote%20jive_macro%22%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2F7.0.4.3b79b96%2Fimages%2Femoticons%2Fcool.png%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-18491%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhmm)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18491%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EByron%2C%20grazie%20mille%20per%20la%20tua%20guida.Il%20tuo%20metodo%20proposto%20funziona%3B%20tuttavia%2C%20mantiene%20la%20variabile%20nello%20stato%20carattere.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHo%20salvato%20il%20tuo%20script%20per%20futuri%20casi%20speciali!%26nbsp%3B%20%3CSPAN%20__jive_emoticon_name%3D%22wink%22%20__jive_macro_name%3D%22emoticon%22%20class%3D%22jive_macro_emoticon%20jive_emote%20jive_macro%22%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2F7.0.4.3b79b96%2Fimages%2Femoticons%2Fwink.png%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-18490%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18490%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20un%20modo%20diverso%20di%20fare%20la%20stessa%20cosa%20che%20Bryon%20sta%20mostrando.La%20mia%20versione%20va%20direttamente%20a%20un%20valore%20temporale%20numerico%2C%20piuttosto%20che%20creare%20un%20valore%20di%20carattere%20che%20viene%20quindi%20inserito.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3EI%20nomi%20predefiniti%20sono%20qui%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%201%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20Crea%20una%20tabella%20di%20dati%20di%20esempio%20con%20alcuni%20tempi%20militari.....%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20La%20colonna%20pu%C3%B2%20essere%20numerica%20o%20carattere...%20la%20conversione%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20la%20formula%20gestisce%20entrambi%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3Edt%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Nuova%20Tavola%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22Senza%20titolo%203%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Aggiungi%20righe%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%202%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Nuova%20Colonna%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22Militare%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Numerico%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22Continuo%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Formato%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22Migliore%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%2012%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Imposta%20valori%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3CSTRONG%3E%20%5B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%201421%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20teal%3B%22%3E%20923%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20%5D%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20Le%20funzioni%20wait()%20sono%20l%C3%AC%20solo%20per%20aggiungere%20un%20effetto%20drammatico%20%3A)%3C%2Fimg%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3EAspettare%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%202%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20Aggiungi%20una%20nuova%20colonna%20per%20contenere%20i%20tempi%20convertiti%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20Usa%20un%20formato%20ora%20poich%C3%A9%20la%20conversione%20creer%C3%A0%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20un%20valore%20che%20%C3%A8%20il%20numero%20di%20secondi%20dalla%20mezzanotte%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3Edt%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20Nuova%20Colonna%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20(%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22tempo%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Numerico%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22Continuo%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Formato%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20purple%3B%22%3E%20%22ore%3Am%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%2012%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3EAspettare%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%202%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20Corri%20su%20tutte%20le%20righe%20ed%20esegui%20la%20conversione%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20La%20formula%20funzioner%C3%A0%20come%20una%20formula%20di%20colonna%20semplicemente%20rimuovendo%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20green%3B%22%3E%2F%2F%20il%20%22%3Atime%3D%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3EPer%20ogni%20riga%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20tempo%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Num%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Sost%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Car%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Militare%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20-%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%202%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20*%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%2060%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3ENum%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Sost%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Car%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Militare%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%201%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Lunghezza%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20%230000dd%3B%22%3E%20Car%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3A%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20Militare%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20-%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20teal%3B%22%3E%202%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%20)%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20*%3C%2FSPAN%3E%3CSTRONG%20style%3D%22color%3A%20teal%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E%203600%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20black%3B%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20black%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%22%3E)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20Consolas%3B%20color%3A%20navy%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-18489%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20Conversione%20del%20formato%20dell'ora%20militare%20(hhhh)%20nel%20formato%20dell'ora%20(hh%3Amm)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-18489%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EProbabilmente%20c'%C3%A8%20un%20modo%20pi%C3%B9%20semplice%20per%20farlo%3B%20tuttavia%2C%20questo%20funziona%20abbastanza%20bene.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPasso%201%3C%2FP%3E%0A%3CP%3ERipeti(%20%220%22%2C%204%20-%20Lunghezza(%20Char(%20%3AStart%20)%20)%20)%20%7C%7C%20Car(%20%3AInizio%20)%3C%2FP%3E%0A%3CP%3ETrasforma%20il%20numero%20iniziale%20in%20un%20carattere%20a%204%20cifre%20riempito%20di%20zeri%20(questo%20%C3%A8%20utile%20anche%20per%20i%20codici%20postali)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPasso%202%3C%2FP%3E%0A%3CP%3ESinistra(%20%3APasso%201%2C%202%20)%20%7C%7C%20%22%3A%22%20%7C%7C%20Destra(%20%3APasso%201%2C%202%20)%3C%2FP%3E%0A%3CP%3EInserisce%20i%20due%20punti%20tra%20le%20ore%20ei%20minuti%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPassaggio%203%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3EFormat(%20Informat(%20%3AChar%2024%20hr%20Time%2C%20%22h%3Am%22%20)%2C%20%22h%3Am%22%20)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EQuesta%20formula%20prende%20il%20carattere%2024%20ore%20e%20lo%20trasforma%20nel%20numero%20di%20secondi%20dopo%20la%20mezzanotte%2C%20quindi%20trasforma%20i%20secondi%20in%2012%20ore.%3C%2FP%3E%0A%3CP%3EInformat%20valuta%20una%20stringa%20di%20caratteri%20e%20restituisce%20un%20numero%3C%2FP%3E%0A%3CP%3Eformat%20valuta%20una%20stringa%20numerica%20e%20restituisce%20un%20carattere%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3EInizio%3C%2FTD%3E%0A%3CTD%3EPasso%201%3C%2FTD%3E%0A%3CTD%3EPasso%202%3C%2FTD%3E%0A%3CTD%3EPassaggio%203%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E3%3C%2FTD%3E%0A%3CTD%3E0003%3C%2FTD%3E%0A%3CTD%3E00%3A03%3C%2FTD%3E%0A%3CTD%3E00%3A03%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E30%3C%2FTD%3E%0A%3CTD%3E0030%3C%2FTD%3E%0A%3CTD%3E00%3A30%3C%2FTD%3E%0A%3CTD%3E12%3A30%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E1130%3C%2FTD%3E%0A%3CTD%3E1130%3C%2FTD%3E%0A%3CTD%3E11%3A30%3C%2FTD%3E%0A%3CTD%3E11%3A30%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E1830%3C%2FTD%3E%0A%3CTD%3E1830%3C%2FTD%3E%0A%3CTD%3E18%3A30%3C%2FTD%3E%0A%3CTD%3E18%3A30%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E........%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eoppure%20potresti%20fare%20tutto%20in%20un%20%22semplice%22%20passaggio%20con%20una%20formula%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EFormat(%0A%20Informat(%0A%20%20Left(%20Repeat(%20%220%22%2C%204%20-%20Length(%20Char(%20%3AStart%20)%20)%20)%20%7C%7C%20Char(%20%3AStart%20)%2C%202%20)%20%7C%7C%20%22%3A%22%20%7C%7C%0A%20%20Right(%20Repeat(%20%220%22%2C%204%20-%20Length(%20Char(%20%3AStart%20)%20)%20)%20%7C%7C%20Char(%20%3AStart%20)%2C%202%20)%2C%0A%20%20%22h%3Am%22%0A%20)%2C%0A%20%22h%3Am%22%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3EConservo%20una%20collezione%20di%20formule%20feroci%20che%20vengono%20riciclate%20per%20casi%20speciali.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
nadershakerin0
Level II

Converting Military Time Format (hhmm) to Time Format (hh:mm)

I need to convert military time in the hhmm format, e.g. 1432 or 725 to hh:mm format e.g. 14:32 to 7:25.  Is there a simple formula that can make the conversion, or should I use a script for it?  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

Here is a different way of doing the same thing that Bryon is showing.  My version goes directly to a numeric time value, rather than creating a character value that is then input.

Names Default To Here( 1 );

// Create a sample data table with some Military times.....

// The column can be either numeric or character...the conversion

// formula handles both

dt = New Table( "Untitled 3", Add Rows( 2 ), New Column( "Military", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1421, 923] ) ) );

// The wait() functions are just there to add a dramatic affect :)

Wait( 2 );

// Add a new column to hold the converted times

// Use a time format since the conversion will create

// a value which is the number of seconds since midnight

dt << New Column( "time", Numeric, "Continuous", Format( "hr:m", 12 ) );

Wait( 2 );

// Run across all rows and do the conversion

// The formula will work as a column formula by just removing

// the ":time="

For Each Row(

       :time = Num( Substr( Char( :Military ), -2 ) ) * 60 +

              Num( Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) ) ) * 3600  

);

Jim

View solution in original post

11 REPLIES 11
Byron_JMP
Staff

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

There is likely a simpler way to do this; however, this works pretty well.

 

Step 1

Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start )

Makes the staring number into a 4 digit character padded with zeros (this is handy for zip codes too)

 

Step 2

Left( :Step 1, 2 ) || ":" || Right( :Step 1, 2 )

Inserts a colon between the hours and minutes

 

Step 3

Format( Informat( :Char 24 hr Time, "h:m" ), "h:m" )

This formula takes the character 24 hr time and turns it into the number of seconds after midnight, then it turns the seconds into 12 hour time.

Informat evaluates a character string and returns a number

format evaluates a numeric strings and returns a character

 

Start Step 1 Step 2 Step 3
3 0003 00:03 12:03 AM
30 0030 00:30 12:30 AM
1130 1130 11:30 11:30 AM
1830 1830 18:30 6:30 PM

 

 

........

 

or you could do it all in one "simple" step with one formula

  

Format(
	Informat(
		Left( Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start ), 2 ) || ":" ||
		Right( Repeat( "0", 4 - Length( Char( :Start ) ) ) || Char( :Start ), 2 ),
		"h:m"
	),
	"h:m"
);

I keep a collection of fierce formulas that get recycled for special cases.

JMP Systems Engineer, Health and Life Sciences (Pharma)
nadershakerin0
Level II

Re: Converting Military Time Format (hhmm) to Time Format (hh:mm)

Byron, thank you very much for your guidance.  Your proposed method works; however, it keeps the variable in character state.

I have saved your script for future special cases! 

txnelson
Super User

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

Here is a different way of doing the same thing that Bryon is showing.  My version goes directly to a numeric time value, rather than creating a character value that is then input.

Names Default To Here( 1 );

// Create a sample data table with some Military times.....

// The column can be either numeric or character...the conversion

// formula handles both

dt = New Table( "Untitled 3", Add Rows( 2 ), New Column( "Military", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1421, 923] ) ) );

// The wait() functions are just there to add a dramatic affect :)

Wait( 2 );

// Add a new column to hold the converted times

// Use a time format since the conversion will create

// a value which is the number of seconds since midnight

dt << New Column( "time", Numeric, "Continuous", Format( "hr:m", 12 ) );

Wait( 2 );

// Run across all rows and do the conversion

// The formula will work as a column formula by just removing

// the ":time="

For Each Row(

       :time = Num( Substr( Char( :Military ), -2 ) ) * 60 +

              Num( Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) ) ) * 3600  

);

Jim
nadershakerin0
Level II

Re: Converting Military Time Format (hhmm) to Time Format (hh:mm)

Jim, your solution worked perfectly. I like how everything remained in the numeric form. Thank you very much!   

Madwolf
Level II

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

Hi Jim,

 

How do I use this script? What are the variables that I needed to change?

 

Then name of the dataset is "transaction_data" and the name of the column that resides the military time is "DAY" (transaction_data:DAY)

So, how should I replace these 2 variables into you script and run?

 

Sorry for such a noob question.

Madwolf
Level II

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

I posted your code, into the formula section of the new field, changed the field to my dataset column name, and it works perfectly!

 

 

Num( Substr( Char( :Military ), -2 ) ) * 60 + Num(
    Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) )
) * 3600

 

 

Thank you so much!

Madwolf
Level II

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

I attempted to use this code to convert a string into a time format (hh:mm)

Num( Substr( Char( :Military ), -2 ) ) * 60 + Num(
Substr( Char( :Military ), 1, (Length( Char( :Military ) ) - 2) )
) * 3600

However, I realised if the string is only 2 digits, it won't get converted. For instance if it is 26, it won't be converted to 12:26am. However, a 3 digit string works fine (100 becomes 1:00am)

How is that so?
txnelson
Super User

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

My first question is, if the length of the input time value is less than 4 characters long, should one assume there are zeros (0) that are missing from the left side of the military time?  If this is the case, I propose the solution below;  It pads the value with leading zeros and then performs the conversion.

standard = Substr( "00", Length( Char( :Military ) ) - 1 ) ||
Char( :Military );

Num( Substr( Char( :standard ), -2 ) ) * 60
+Num(
	Substr(
		Char( :standard ),
		1,
		(Length( Char( :standard ) ) - 2)
	)
) * 3600;
Jim
Madwolf
Level II

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

It works! Thank you so much. I learnt so much just by looking at the formulas you proposed!

Recommended Articles