Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Displaying time in date columns (Read 4308 times)
Lucas D
Full Member
*
Offline



Posts: 133

Displaying time in date columns
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
Back to top
 
« Last Edit: Jun 15th, 2015, 4:14pm by Lucas D »  

WWW   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: (1 of 4:) Displaying time in date columns
Reply #1 - 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.
Back to top
 
 
WWW   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: (1 of 4:) Displaying time in date columns
Reply #2 - 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?
Back to top
 
 

WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: (1 of 4:) Displaying time in date columns
Reply #3 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: (1 of 4:) Displaying time in date columns
Reply #4 - 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.
Back to top
 
 

WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: (1 of 4:) Displaying time in date columns
Reply #5 - 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?
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: (1 of 4:) Displaying time in date columns
Reply #6 - 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.
Back to top
 
 

WWW   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: (1 of 4:) Displaying time in date columns
Reply #7 - 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.
Back to top
 
« Last Edit: Jun 15th, 2015, 3:10pm by Lucas D »  

WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: (1 of 4:) Displaying time in date columns
Reply #8 - Jun 15th, 2015, 3:22pm
 
I'm updating the aTbRef article for this as it's a bit out of date.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: (1 of 4:) Displaying time in date columns
Reply #9 - 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?
Back to top
 
 

WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Displaying time in date columns
Reply #10 - 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.
Back to top
 
« Last Edit: Jun 15th, 2015, 4:43pm by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Lucas D
Full Member
*
Offline



Posts: 133

Re: Displaying time in date columns
Reply #11 - 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).
Back to top
 
 

WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Displaying time in date columns
Reply #12 - 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.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print