# Infor M3 Date Format: User Setting, API and Database

> Source: https://netray.co/erp-help/infor-m3-date-format-user-api-yyyymmdd
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## 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.

## Kind

how-to

## System

infor-m3

## Erp

Infor M3

## Module

User settings / MI APIs / Integration

## Query

infor m3 date format

## Alternate Queries

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

## 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.

## Steps

### Fix a date format problem

**Items:**

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

## Sections

### Three formats, one rule

**Body:**

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

**Body:**

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.

**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

**Body:**

- 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.

## 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.

## Ai Angle

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.

## Faq

### What date format do M3 APIs use?

**Answer:** 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?

**Answer:** 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?

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

## Search terms

infor m3 date format, m3 api date format, m3 yyyymmdd, m3 user date format, m3 date conversion sql, m3 MNS150 date, m3 mi date parameter, infor m3 integration dates

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
