This is an old revision of the document!
BIZWEAVER
All
How to format dates and time for SAP Business One.
<p>Working with dates and times when importing data into SAP Business One can be a little tricky. A specific format is required for the DI to understand what is being passed in.</p><p>For dates, use the following SQL statement: convert(varchar,date_field,112) as [Converted_Date]. This will create the date in YYYYMMDD format.</p><p>For times, use the following SQL statement: right('00' + cast(datepart(HOUR,date_field) as varchar),2) + right('00' + cast(datepart(MINUTE,date_field) as varchar),2) as [Converted_Time]. This will create the time in HHMM format, with zero padding as needed.</p><p>In both examples, “date_field” is the date field you need to convert.</p><p>If the SAP field is just a date, the date format is fine. You do not need to provide a time value. When an actual time value is needed, it will be in a separate field in the data record. This is the case where you will use the time format as shown.</p>
HowTo
31 Jan 2018