Wiki

Scale Your Enterprise

User Tools

Site Tools


kb:kb_item_328

This is an old revision of the document!


KB Item 328

Product

BIZWEAVER

Product Version (if applicable)

All

Issue

How to format dates and time for SAP Business One.

Symptom

Cause

Resolution Notes

<p>Working with dates and times when importing data into SAP Business One can be a little tricky.&nbsp; 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].&nbsp; 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].&nbsp; 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.&nbsp; You do not need to provide a time value.&nbsp; When an actual time value is needed, it will be in a separate field in the data record.&nbsp; This is the case where you will use the time format as shown.</p>

KB Type

HowTo

Item Date

31 Jan 2018

kb/kb_item_328.1548341071.txt.gz · Last modified: 2019/01/24 09:44 by