How-toInfor M3User settings / MI APIs / Integration

Infor M3 Date Format: User Setting, API and Database

Question
infor m3 date format

Also searched as

  • m3 api date format yyyymmdd
  • m3 change user date format
  • convert m3 date in sql

Short answer

M3 stores and exchanges dates as 8-digit numbers in year-month-day order, for example 20261021. What a user sees on a panel follows the date format set on their user record, but the database and MI APIs do not change with it. Convert at the edges of an integration and never rely on the display format.

Applies to: Infor M3 H5 Client, MI APIs, and direct database or reporting queries. Behaviour of the display format can vary by client and version.

Fix a date format problem

  1. 1Decide which layer has the problem: display in the client, value passed to an MI API, or value read from a table.
  2. 2For display, open the user record in MNS150 and check the date format setting, then start a new session.
  3. 3For an API call, send dates as 8 digits, YYYYMMDD, with no separators, regardless of the user's display format.
  4. 4For database reads, treat date columns as numbers in YYYYMMDD and convert in your query or reporting tool.
  5. 5Validate that month and day are real. M3 rejects an impossible date such as month 13, and a zero date means not set.
  6. 6Check time zones separately. M3 time fields are typically HHMMSS numbers, and conversion between system and user time is a different concern.
  7. 7Add a unit test in your integration that round-trips a known date.

Three formats, one rule

The user format controls how a person types and reads a date on a panel, for example day-month-year versus month-day-year. It is a presentation setting held on the user record.

The API and database use the internal 8-digit format. A date typed as 21/10/2026 on a panel is stored as 20261021. If a script copies a displayed value into an API call it will fail or, worse, be misread.

Converting in integrations

Convert at the boundary. Parse the incoming date from the source system into a real date type, then format to YYYYMMDD only when you call M3. Going the other way, parse the 8-digit value once and keep a real date type in your code.

// JavaScript: M3 YMD8 <-> Date
function toM3(d) { return d.getFullYear() * 10000 + (d.getMonth() + 1) * 100 + d.getDate(); }
function fromM3(n) { var s = String(n); return new Date(+s.slice(0, 4), +s.slice(4, 6) - 1, +s.slice(6, 8)); }
-- SQL Server pattern
SELECT CONVERT(date, CAST(OACUDT AS char(8)), 112) FROM OXHEAD;

Reporting and filtering

Since dates are numbers, range filters work as numeric comparisons: greater than 20260101 and less than 20260201. This is fast, but invalid values and zeros must be excluded.

In BI tools build a date dimension keyed on the 8-digit value so that M3 dates join without conversion.

Try it here, free

M3 MI API Batch Load Time Estimator

Open full tool

Estimate how long a bulk load through M3 APIs will run and how added parallel threads change it, using your own measured response time.

Common pitfalls

  • !Passing a display-formatted date to an API.
  • !Treating 0 as a real date and getting year 0 results.
  • !Mixing user display format with stored values when debugging.
  • !Forgetting that a changed user format needs a new session.
  • !Converting through a string with the server locale, which breaks on another machine.

How an ERP-grounded AI assistant handles this

A data assistant can hide the format difference: it knows the stored value is YYYYMMDD and writes the right filter when someone asks for last month's orders. Netray sets this up so the generated SQL is shown and can be checked, and runs against your M3 data on your own infrastructure.

Frequently asked questions

What date format do M3 APIs use?

Eight digits in year, month, day order (YYYYMMDD). That applies to input and output of MI transactions regardless of the user's display setting.

Where do I change my date format?

On your user record, maintained by an administrator in MNS150. It affects display only, and takes effect in a new session.

How do I tell an unset date in M3?

It is stored as 0 or blank depending on the field. Filter those out in reports and do not convert them to a date.

Related

Advanced

Infor M3 SDK, MI APIs and REST API Documentation Guide

There is no single M3 SDK. Developers use a set of tools: MI programs (the API layer over Business Engine), the REST endpoint that exposes them, the H5 client SDK for scripts and extensions, and the Grid and ION tooling around them. Start with MI programs and REST, and use the official Infor documentation for the transaction list.

Advanced

How to Call M3 API (MI Programs) Through ION API

Calling M3 from an external system today almost always means going through ION API rather than the older direct MvxAPI SOAP endpoint: you create an ION API authorized app or service account in the ION API portal, download its .ionapi credential file, obtain an OAuth 2.0 access token, and call the M3 MI program transaction through the m3api-rest execute endpoint with that token.

Advanced

Paging M3 API MI List Transactions Past the Default Record Limit

M3 List transactions (the read/browse transaction most MI programs expose, such as CRS610MI.LstByNumber or OIS100MI.LstOrderHead) cap the rows returned per call using the MaxReturnedRecords input field, and by default many clients leave it low or unset, which looks like the API silently truncating results. Set MaxReturnedRecords explicitly, then loop the call using the last key values from the previous page as the starting position until fewer rows than the limit come back.

Error fix

M3 API Error: Record already exist

Record already exist means the MI Add transaction you called is trying to insert a key that is already present in the target M3 table, most often because a prior call succeeded and was retried, or because the key fields you built do not match what you think they match. Read the errorField and errorFieldGroup attributes on the response to see exactly which key field M3 flagged, then either switch to the matching Chg (change) transaction or fix the key construction in the caller.

Error fix

M3 API Error: Not Authorized to Program

Not authorized to program (or the equivalent transaction-level authorization error) means the M3 user ID the integration authenticates as can log in fine but has not been granted access to that specific MI program, transaction, or company/division through its authority group. Fixing it means adding the program/transaction to the integration user's authority group in M3, not changing anything in the calling code.

How-to

How to Build a Grid Mapping in M3 Enterprise Collaborator (MEC)

M3 Enterprise Collaborator (MEC) moves data between an external format (EDI, flat file, XML) and M3's own API by chaining a collection step (getting the document in), a grid mapping step (field-level transformation from source structure to M3 API call structure), and a delivery step (executing the mapped MI transaction). Building a new mapping means defining the source document structure, building the grid that maps each source field to its M3 API field, and testing with representative sample documents before going live.

AI for ERP

Infor M3 AI: A Practical Path from MI Programs to a Private Assistant

Infor M3 AI explained: grounded natural-language answers over MI programs and MEC, agents for distribution and manufacturing, on-prem or EU private cloud.

Stuck on Infor M3?

Talk to engineers who work inside Infor M3 every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Runs with your ERP

Guides

AI on your ERP

Integrations

Comparisons

Software