Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Moving to Tinderbox 6 >> Displaying time in date columns
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1434387444

Message started by Lucas D on Jun 15th, 2015, 12:57pm

Title: Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 12:57pm

Hello all,

Despite repeated forays into TB6, I continue to find myself using TB5 almost exclusively. But I know I need to adapt. So, there are currently four issues I am having with TB6, which I will discuss in separate posts.

1. Displaying time in date columns in Outline View. In TB5, I see the date plus the time, but in TB6 I only see the date. Is there a way to tweak this so that I can see the time as well in Outline View columns?

Thanks,

Lucas

Title: Re: (1 of 4:) Displaying time in date columns
Post by Mark Bernstein on Jun 15th, 2015, 1:11pm

By default, when Tinderbox displays date attributes in outline columns is uses your short date settings, which typically look like this on a US system:

    6/15/2015, 1:04 PM

Note that the entire date string might not appear if the column width is narrow.

A common request is the opposite: how can I not display the time?  The key here is to convert the date to a string that is formatted as you want, using an agent or a rule:

    Rule: $MyString=$StartDate.format("=")

Then set the view to display a column for $MyString and you're set.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 1:49pm

Thank you. I tried your suggestion, but something seems to be overriding how the date gets displayed. I still see only the date in the column in Outline View. The same file shows the date plus the time when opened in TB5. Could there be something else I'm missing?

Title: Re: (1 of 4:) Displaying time in date columns
Post by Mark Anderson on Jun 15th, 2015, 2:25pm

Have you dragged the column wide enough to allow space for both the date and time? The default column width may not be sufficient.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 2:37pm

@MarkA: Thanks. I should have mentioned that. Indeed, I have tried widening the columns, but still the time does not display.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Mark Anderson on Jun 15th, 2015, 3:00pm



In the image If you delete the contents of the Format box in the pop-up you will set only the the date (formatted as for your locale's sort date format). But with the date format string in the box you set the time. The second column shows $MyString formatted via a rule as in MB's last post.

Does that help?

Title: Re: (1 of 4:) Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 3:04pm

Whoops, sorry. My mistake. Mark B's suggestions does indeed work. Date-type attributes seem to always display with only the date (unlike in TB5), but if I use a string-type attribute, I can indeed get the date/time to display however I like. Thanks for your help.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 3:09pm

Mark A: Brilliant! That's exactly what I was looking for. I didn't know about that pop-up- I see now that for some reason the "Format" for my date columns was defaulting to "2". But using the pop-up, I can manually set the format how I want, which obviates the the need to copy the date to a separate, specially created string-type column.

Thanks very much.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Mark Anderson on Jun 15th, 2015, 3:22pm

I'm updating the aTbRef article for this as it's a bit out of date.

Title: Re: (1 of 4:) Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 3:25pm

I think I see what is happening under the hood. For all user attributes, whether number-type, string-type, or date-type, the variable "2", which indicates 2 decimal points, is getting attributed. So for the date-type columns, the number 2, that comes from the default 2 decimal points, is being interpreted as a date format, which ends up showing the date without the time. For instance, if I create a text-string column, and click the title to see the pop-up (as in Mark A's screenshot), the 2 decimal places attribute still shows up, even though text shouldn't have decimal points.

Am I making sense?

Title: Re: Displaying time in date columns
Post by Mark Anderson on Jun 15th, 2015, 4:42pm

'2' isn't a date format. The dialog's second input box has a default value '2', regardless of the input's label. The label is 'Decimals' unless the selected attribute's data type is 'Date'. But of course you don't see the alternative caption until you open the dialog for a second time, having set a Date attributer for the first box.

Don't get too hung up on that part.  If you set a Date-type attribute, just delete the default value in the box and put your desired format value string in the box.  If no string is given (or the default 2 value is left in there) the format short is you locale's short form date. For me in UK that is [d]d/[m]m/yyyy, e.g. 1/6/2015 or 31/11/2014, etc.

Now articles: see here and here.

Title: Re: Displaying time in date columns
Post by Lucas D on Jun 15th, 2015, 6:56pm

Great, thanks for the updated articles. I understand what you mean about the number 2. It would appear then, that the issue is simply that a decision was made to make the default format display just the date, rather than the date and time (which would make sense, given what Mark B was saying about people more often wanting to hide the time).

Title: Re: Displaying time in date columns
Post by Mark Anderson on Jun 16th, 2015, 2:48am

I believe so. It's certainly true in the case of key attributes that people often ask how to hide the time part of a date time.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.