Showing results for 
Search instead for 
Did you mean: 

Display UserDataSource date format

Former Member
0 Kudos


when i show an date value with an UserDataSource, it doesn't use the SB1 format (it seems to be the Windows current format)

How can i use the SB1 date format ?


Accepted Solutions (1)

Accepted Solutions (1)

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Serge,

You must use dt_DATE as type of UserDataSource as Alexey told you to have the date shown in the correct format as all the forms in B1.

form.DataSources.UserDataSources.Add("DunnDate", SAPbouiCOM.BoDataType.dt_DATE)

To fill the information inside the UserDataSource you must format your variable of type Date with the format yyyyMMdd to be accepted by the UserDataSource of type dt_DATE. Here you have a sample:

oForm.DataSources.UserDataSources.Item("DunnDate").ValueEx = Today.ToString("yyyyMMdd")

Hope it helps


Answers (1)

Answers (1)

Active Contributor
0 Kudos

Hi Serge!

all you need is to set Date-type of UsDataSource as a second parameter of UsDataSource.Add()-method.