Just starting out? Need help? Post your questions and find answers here.
-
offsides
- Enthusiast

- Posts: 103
- Joined: Sun May 01, 2011 3:09 am
- Location: Northern California
Post
by offsides »
Here's an elementary concatenation that has me stumped:
Code: Select all
Define.f Hr, Min, Sec
Seconds = 3661
Hr = Int(Seconds/3600): Rem = Mod(Seconds,3600)
Min = Int(Rem/60)
Sec = Mod(Rem, 60)
Debug Hr
Debug Min
Debug Sec
Debug StrF(Hr) + ":" + StrF(Min) + ":" StrF(Sec)
PB 5.72 (32-bit) on Win 10.
-
Demivec
- Addict

- Posts: 4259
- Joined: Mon Jul 25, 2005 3:51 pm
- Location: Utah, USA
Post
by Demivec »
If your question is regarding the syntax error then add a '+' before the last StrF().
Code: Select all
Debug StrF(Hr) + ":" + StrF(Min) + ":" + StrF(Sec)
-
Allen
- Enthusiast

- Posts: 103
- Joined: Wed Nov 10, 2021 2:05 am
Post
by Allen »
Hi,
Just to remind there is a FormatDate command may come in handy.
Code: Select all
Debug FormatDate("%hh:%ii:%ss",3661)
Allen
-
offsides
- Enthusiast

- Posts: 103
- Joined: Sun May 01, 2011 3:09 am
- Location: Northern California
Post
by offsides »
Oh, man, this is beyond embarrassing, on both counts.
Thanks, Demivec, Allen.
PB 5.72 (32-bit) on Win 10.