Skip to Content
0
Former Member
May 08, 2008 at 01:01 PM

XML - Date Format & Date Image

67 Views

Hi,

I like to build a field with SBO date format and with date image by using XML.

Here is the code to input my date to the field; but I get wrong format 2008-05-08 (Correct is 2008/05/08; how do I know 😊

If I databound the field I get the date image; but the field is a dummy field for creating a Sales Order from my Add-On.

C# CODE

string vDate = Convert.ToString(System.DateTime.Today);
vDate = Convert.ToString(System.DateTime.Today).Remove(10,9);
( ( SAPbouiCOM.EditText ) ( oForm_SalesOrderP3.Items.Item("edtPostDat").Specific ) ).Value = vDate;

XML CODE

<item	uid="edtPostDat" 
							type="16" 
							left="532" 
							tab_order="0" 
							width="164" 
							top="32" 
							height="17" 
							visible="1" 
							enabled="1" 
							from_pane="0" 
							to_pane="0" 
							disp_desc="0" 
							right_just="0" 
							description="Posting Date Edit" 
							linkto="" forecolor="-1" 
							backcolor="-1" 
							text_style="0" 
							font_size="-1" 
							supp_zeros="0" 
							AffectsFormMode="1">
							<AutoManagedAttribute/>
							<specific TabOrder="0">
								<databind databound="0" table="" alias=""/>
							</specific>
						</item>