Format datetime editor in customization


(John Abdoelrazak) #1

Hi all,
Can someone tell me how to show a date-time editor in a customization, without showing the time part.I only wish to see the date.

Thanks in advance,

(Brandon Anderson) #2

I’m pretty sure you have to use the extended properties to change that. In your customization go to tools, wizards, customization wizards.


Then go to modify extended properties, launch the wizard, find your data view, and data field, choose format, and enter the format that you want. I haven’t messed with this before, so I’m not 100% sure on what to type in for the format, but looking at what’s in the JobOper_DueDate in the view for the customization I looked at, shortyeardate would probably work for what you want. Someone else can probably jump in a give a little better specifics.

(Brian Garver) #3

Is this for a native control or a custom control? For custom controls, there is an EpiDateTime Editor that only shows the Date and an EpiTimeEditor for time…

(John Abdoelrazak) #4

Thanks for helping, guys,
I have tried Brandon’s solution and this works.
Brian’s suggestion will not work for me, since I have a (custom) control and I want it to show only the date.
Thanks again !


(Shannon Kearney) #5

Do you have an example of how this worked? I have tried doing this and it isn’t working for me. This is what I have.

	private void SetExtendedProperties()
		// Begin Wizard Added EpiDataView Initialization
		EpiDataView edvGS_Order_Detail_DataView = ((EpiDataView)(this.oTrans.EpiDataViews["GS_Order_Detail_DataView"]));
		// End Wizard Added EpiDataView Initialization

		// Begin Wizard Added Conditional Block
		if (edvGS_Order_Detail_DataView.dataView.Table.Columns.Contains("OrderDtl_RequestDate"))
			// Begin Wizard Added ExtendedProperty Settings: edvGS_Order_Detail_DataView-OrderDtl_RequestDate
			edvGS_Order_Detail_DataView.dataView.Table.Columns["OrderDtl_RequestDate"].ExtendedProperties["Format"] = "shortyeardate";
			// End Wizard Added ExtendedProperty Settings: edvGS_Order_Detail_DataView-OrderDtl_RequestDate

(Chris Conn) #6

Just use the right control for the job as mentioned by @bmgarver and I think you’ll be golden.