Jump to content

Remove colons ":" from a string with PCM?


Recommended Posts

Just whipped this up
unmodified_seconds = ""
seconds = ""
minutes = ""
hours = ""
unmodified_seconds =timeInSeconds()
seconds = mod(unmodified_seconds,60)
minutes = mod(((unmodified_seconds-seconds)/60),60)
hours=(unmodified_seconds-(minutes*60+seconds))/3600
display(hours,minutes,seconds)
Ill leave adding if/then conditions for single digit values and military time etc to you. Heres the meat...
I did it that way (ok, date is involved):

Datum = dateInNumbers()
Zeit = time()
Tag = strElement(1,".",Datum)
if len(Tag) == 1 then
Tag = text("0",Tag)
endif
Monat = strElement(2,".", Datum)
if len(Monat) == 1 then
Monat = text("0",Monat)
endif
Jahr = strElement(3,".", Datum)
Stunde = strElement(1,":",Zeit)
Minute = strElement(2,":",Zeit)
Sekunde = strElement(3,":",Zeit)
ZeitF = Stunde+"_"+Minute+"_"+Sekunde
DatumFile = Jahr+Monat+Tag+"__"+ZeitF
×
×
  • Create New...