Omit time component of custom date/time field from bug lists

Greetings,

I have searched the group, looked at the docs, and even browsed the source =
code. Surely others have asked this and I apologize if I just haven't seen =
that--I just can't imagine I'm the first one.

Anyway, we need some custom dates in Bugzilla 3.6. No problem--there is a "=
date/time" field format for custom fields. This works great. The problem is=
 that we absolutely do not care about TIMES. We only care about dates. We c=
an live with the superfluous "time" string that gets appended to the date o=
nce it has been saved, in the bug edit page. But for lists of bugs, the sup=
erfluous time string (which in our case is and always will be "00:00:00") t=
akes up a ton of precious horizontal space in the column output. This is co=
mpounded by the multiple custom dates we need to display in one list.

Question: how can I most simply and most safely omit the TIME portion (00:0=
0:00) from all custom date field display in bug lists?

(I don't mind if it keeps showing up in bug EDIT pages. We can live with th=
at).

Thanks,
DY
0
Dan
12/22/2010 7:26:29 PM
mozilla.support.bugzilla 10182 articles. 0 followers. Post Follow

1 Replies
642 Views

Similar Articles

[PageSpeed] 57

Pretty shocked to get no replies, but thanks much anyway.

For posterity's sake, here's what I did in buglist.cgi down in the results retrieval section (while (my @row = $buglist_sth->fetchrow_array()) { ):

    if ($bug->{'cf_duedate'}) {
        $bug->{'cf_duedate'} = substr($bug->{'cf_duedate'},0,10);
    }
    if ($bug->{'cf_betadate'}) {
        $bug->{'cf_betadate'} = substr($bug->{'cf_betadate'},0,10);
    }
    if ($bug->{'cf_testdate'}) {
        $bug->{'cf_testdate'} = substr($bug->{'cf_testdate'},0,10);
    }



My three dates are cf_duedate, cf_betadate, and cf_testdate.

I saw some "special formatting" for things like changeddate so I followed that model to hack the output of these fields prior to the bug being added to the stack. Seems to work fine.
0
Dan
12/28/2010 11:29:57 PM
Reply:

Similar Artilces:

just Time or date portion of a date/time field
Good Day, From a DateTime data column how do I get just a Time portin or just a date portion of data to be displayed. i.e from 11/6/2003 10:03:20 AM I need to display date and time seperately in my data display page. Thanks Regards, In code you could use Dim dt as System.Date Dim day, month, year as integer day = dt.Day month= dt.Month year = dt.Year This also works with DateTime In SQL you could use DATEPART(<datepart>,<datetime>) where <datepart> is the abbreviations mentioned in post 385301 and <datetime> is a...

date/time or date and time
I am setting up an SQL database and I will need to get differences in dates. For example I have a start date, start time, completion date and completion time and I want to get the difference between the start and completion. Would it be better to have one field with both date and time in it, or better to have a date field and a time field? Even though I have already started setting up the tables with seperate fields for date and time I am now leaning toward one field with date/time in it. (Only because that is the way I had to do it when setting up an Excel spreadsheet for a similar ta...

Date entered...add time value to make date/time field
Windows XP Professional InfoMaker v 9.0.2 Build 7509 Our database contains a date/time stamp for when a specific activity happens to each shipment. I would like the users to be able to simply enter a date for a specific work day. I need to get a list of shipments where the time of one activity occurred on the entered date prior to 9:20. How can I create a computed field that will basically concatenate/amend the entered date with 9:20 that will later be used for criteria in returning rows? Thanks in advance for any help you can provide! Rita Palazzi Senior Engineer /...

just Time or date portion of date/time field: SOMEBODY PLS
Good Day, From a DateTime data column how do I get just a Time portin or just a date portion of data to be displayed. i.e from 11/6/2003 10:03:20 AM I need to display date and time seperately in my data display page. Thanks Regards, When you pull in a SQL datetime column value into your .NET code, it is usually cast to a .NET DateTime type... something like this: System.DateTime TheDateAndTime = (System.DateTime)someDataReader["MySQLDateColumn"] Then you can use a variety of .NET methods included in the DateTime class to convert to a strin...

hide time in date/time field
hi. i have code : objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\database\tfasim.mdb;")   if rblLTorGT.SelectedValue = "Id" then      strSQLQuery = "SELECT Date_T as  [date] ,name FROM table " & _     ORDER BY " & ddlSortBy.SelectedItem.Value.ToString() & ddlSortOrder.SelectedItem.Value.ToString()   objCommand = New OleDbCommand(strSQLQuery, objConnection)   objConnection.Open()    objData...

Update Only the Time in a date time field
Hi,i have a table having a datatime field and on a datagrid I need only to display and update the time part. I'm using select CONVERT(CHAR(8), JobStartTime, 8) AS StartTime from table to get the date. What is  the best way to write the update command . What woul dbe the best approch.   Regards, Vijay  1. Instate of doing formatting in the SQL, Try to do that is the DataGrid with FormatString. 2. To Update the Database , you can do that in two ways.    a. Either go for Store Procudure. Send the TIME you want to set for record. Your SP should some ...

Date / Time Field
PB 7.0.3 I have an application that records patient encounters, treatments and referrals for an Emergency Department within a hospital. Each encounter records time to nurse and time to physician - these fields are of datetime format. This application is for statistical purposes only and therefore is not real time (unit clerks key in the necessary data throughout the day). Here is a senerio... Patient A enters the ED and the date / time of encounter is recorded. The date and time that the triage nurse first assesses the patient is recorded (time to nurse) The date and time that th...

Date Time field return just time
 Hi, I have a data/time field in access which is queried using a datasource linked to a check box list, the field contains only hh:mm but is returning dd/mm/yyyy hh:mm, does anyone know how to just return hh:mm? Thanks  Hi, It will return complete date and timestamp so if you want the same to be displayed in hh:mm format then while qerying you will need to format the feild if you want it in hh:mm.  ThanksAshishhttp://itsmeashish.blogspot.com...

Date/Time Fields
On the datawindow, if the field is centered, then the width of the field should be large enough. Otherwise, if the width is smaller, then the field can not refresh itself, a recurred flashing occurs and PB terminates. Is this a bug? PB 6.0 and PB 6.5 Far as I can tell, yes. I've run into it as well. I've always have just expanded the field. It occurs to me now that I've never reported it to Sybase. I shall do so now. On Thu, 25 Feb 1999 09:28:24 -0500, in powersoft.public.powerbuilder.datawindow Bora SUSMAZ <bsusmaz@hotmail.com> wrote: >On the datawindo...

remove time part from a date/time field value
How does one remove or avoid the time part from a date/time field value. For example store 12/12/2006 instead of 12/12/2006 12:00:00 Am --------------------------------------------------No Project Too Eazy.-------------------------------------------------- You can use one of the appropriate Standard DateTime Format Strings such as d or D.Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! You should be able to use DateTime dt = DateTime.Now dt.ToString("d")  //this will format as short date time FYI: If you want to do it at the query ...

custom aggregate component - design time
Hi! I'll rephrase my question. I'm creating a custom component that consists of a TPanel descendant having many controls inside. As I noticed while using it I need to differentiate behaviour between runtime and designtime. Question 1: Is there a documentation of good practices about this (I know there should be many, I just didn't find it) Question 2: To expose the properties of the inner controls do I have to make them properties of my component or there is another way? Thanks Hello, Dario Guzik wrote: > As I noticed while using it I need to differentiate ...

times out all the time!!!
Name: Optical Excellence Email: specsatopticalexcellencedotca Product: Thunderbird Summary: times out all the time!!! Comments: I can not access either the web email site downloaded mail nor the Thunderbird email downloaded email because I get a time out all the time!! Not a way to run an email site, especially as this is for our business! Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 ...

DATE field to DATE/TIME
Hello, If the field is defined as a DATE and you do: select datefield+1 from mytable Does the ODBC API (actually ASA 9.02 backend) return a field that is DATETIME or a DATE field? It is messing up my compiled application and seems to be coming back as DATETIME. Thank you. -Robert You are correct, the value is being returned as a TIMESTAMP. You can verify this through using the EXPRTYPE() builtin function, as in select exprtype('select datefield+1 from mytable', 1) from dummy which will return TIMESTAMP. Exprtype is documented in the help. You alm...

time-time
Hi There, Delphi 2010 with PostGresSQL 9.3 database. I did try := Time(), the way it worked with Paradox and many more I tried. E2250 no overload version of "TimeToStr" that can be called with this argument. Can somebody guide me here, thanks in advance. {delphi code} dm.tArrivedwaiting.value := timetostr() - dm.tArrivedtime.value ; {code} Fields are StringFields or time with time zone(tried without??) ////// CREATE TABLE "ARRIVED" ( dummy serial NOT NULL, userno smallint, "time" time with time zone, patientno integer, ...

Web resources about - Omit time component of custom date/time field from bug lists - mozilla.support.bugzilla

Component - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

AirAsia disaster: Indonesia cites faulty component, crew response in crash
Pilots appear to have reset the computer system's circuit breaker, leading to a series of failures that caused them to lose control of the plane ...

It’s a new year, and time for the claimed iPhone 7 component photos to begin
Taiwanese site Apple Club has posted what it claims are leaked photos of iPhone 7 components. The photos appear to show the backlight of a new ...

Japan follows US lead in banning certain Takata components
Filed under: Government/Legal , Safety , Japan Like the US, Japan will ban certain Takata's airbag inflators from vehicles in development, and ...

Lumentum, Fabrinet: Component Makers at Start of 5-Year Boom, Says Needham
Needham & Co .’s Alex Henderson today advises fiber optics enthusiasts to look to component makers , such as Lumentum ( LITE ), in 2016, more ...

Samsung reportedly lost key iPhone 7 component business
... for Samsung , which is ironic considering the two companies are fierce rivals in the mobile business. The Korean giant produces various components ...

Crew, faulty component caused AirAsia crash
Indonesian investigators said crew action and a faulty component caused the AirAsia jet crash in the Java Sea last year, killing 162 passengers. ...

John Ridley Extends ABC Studios Deal For Three More Years; Film Component Added
John Ridley and his production arm, International Famous Players Radio Picture Corporation, have extended their first-look deal with ABC Studios ...

Passive component maker Chilisin reports 20% increase in October revenues
Chilisin Electronics, which manufactures inductors and power chokes, has announced consolidated revenues for October 2015 increased 20.3% from ...

Teflon Component Tied to Kids' Weight Gain
PFOA, a main component of Teflon, has been linked to increased body fat and faster weight gain in children.

Resources last updated: 1/18/2016 12:31:45 PM