Field Customization with Date AND Time

 
Author
Message
SysAider
35
 
I have created some custom date fields which allow only mm/dd/yyyy, but I want the fields to include both the date AND the time (HH:mm).
Anyone know how to do this?
SysAider
35
 
Reply from a submitted request.

Thank you for contacting SysAid Customer Relations.

Unfortunately, in the out-of-the-box version of SysAid, there is no possibility to add such a field type. If you would like, I can forward this request to the Profesional Services team and check if they can create a custom solution for you. Keep in mind that this might imply additional fees.

Kindly let us know your thoughts on this matter.
Thank you for your time and have a great day!

Best Regards,

Vladut Adrian Prelipcean
Customer Support Engineer
SysAider
35
 
My workaround was to create a separate text field for the time.
I did this and included notifications in the workflow which referenced these fields.
Guess what?
These fields do include the Date AND Time, contrary to the "engineer" who replied. (See attached screenshot which shows the display of the time.)
I'm assuming (given the responses thus far) that not only is it not possible to EDIT the value for time in this field, but that it is also not possible to not display the time in a notification, which would be desirable since this value is not editable and thus not useful.

I could write pages about my dissatisfaction with this result, but since it would only receive the reply,
If you would like, I can forward this request to the Professional Services team and check if they can create a custom solution for you. Keep in mind that this might imply additional fees.

And wait 7+ years for a reply, I don't think I will bother.
SysAider
35
 
I received the following reply from a different SysAid Support Engineer.
This solution does accomplish my end goal.


To add a custom date and time field, please go to Settings >> Customize > Fields Customization >> Service Record >> Add a new custom column >> Field Type: Date >> Apply >> Advanced >> search for the formats MM/dd/yyyy or dd-MM-yyyy and make sure that each of them to are set to MM/dd/yyyy HH:mm:ss or dd-MM-yyyy HH:mm:ss (that includes all of the boxes where available).

Next, change all the lines containing 'new calendar' to 'true' instead of 'false'.

Next, remove the 'Display in List' and change it to the below:

import java.text.SimpleDateFormat;
import java.sql.Timestamp;
import java.util.Date;
Timestamp timeStemp = rs.getTimestamp("sr_cust_occurred");
//return (timeStemp!=null ? dateOnlyformat.format(new java.util.Date(timeStemp.getTime())) : "");
SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
return format.format(timeStemp.getTime());

The text sr_cust_occurred from the above needs to be changed with the value of the fields' DB Field Name from the General Tab.

Once done, the date and time field should appear correctly on both the details page of the SR and on the List view of the field.


Many thanks to Felicia!