Missing zero on time extract

Hi,

I’m saving some data in the database as type ‘date’, this is required for various reasons. It stores the information as expected.

Time

Later on I want to display the time only so I am extracting the hours and minutes as text, however any time that has two zero’s such as in this example only shows one. I’m guessing it’s a bug but is there a way around this at all?

Opening%20time

Are you extracting hours and minutes separately? This is probably not necessary. Instead, use formatted as:

image

Thanks for the reply. Yes, I’m extracting as text as I only want the time, I don’t want the date. As I’m doing it this way the only formatting options I get would be as follows;

The reason that it’s showing a single zero is that for a computer, 00 is treated simply as 0.

If this is only for displaying a certain time (and not the date), I’d go with the following:

datetime

John

Petter is spot on, you don’t need to do the extract if it is already stored as a date - just format the date to just show the time.

Simon

Thanks Petter, Simon. That’s made my life a lot easier and works as you said it would.

Thanks again

John

1 Like

Awesome!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.