Log entry time in report designer

Discussions about Diving Log 6.0 - questions and hints
Post Reply
natedawg4081
Posts: 6
Joined: Mon Aug 19, 2013 22:01

Log entry time in report designer

Post by natedawg4081 »

I am trying to set the Variable LogEntryTime to a 24hr time. Is that possible. I can provide an image of what I'm trying to do and what I have done so far. It will only display the 12hr time with am/pm
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Log entry time in report designer

Post by divinglog »

Hi

Yes, this is indeed a bit tricky. Can you try this formula to see if it works?

Code: Select all

Date$(DateHMS (val(Left$ (LogEntrytime,2)), val(Right$ (LogEntrytime,2)), 0),"%02h:%02i %PM")
natedawg4081
Posts: 6
Joined: Mon Aug 19, 2013 22:01

Re: Log entry time in report designer

Post by natedawg4081 »

That didnt work. The code I am using currently is below and just displays a 12 hour time

if(LogEntrytime<>"",StrSubst$ (LogEntrytime,".",":") , "--")
divinglog
Site Admin
Posts: 5779
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Log entry time in report designer

Post by divinglog »

Are you sure you've copied the full line of code above? Please use just that line for now for testing, not a combination with your existing code. I've tested it and it works for me. If you're using 12 hour time format in Windows, the entry time should be formatted that way automatically.
Post Reply