FileMaker Data API を実行ステップや、FileMaker Data APIの戻り値の日付フォーマットについて
FileMaker Data API で、ID による単一レコードの取得、レコードの取得、およびレコード検索のエンドポイントに FileMaker Data API によって返される日付およびタイムスタンプフィールドの形式を制御するオプションの dateformats 引数が含まれるようになりました: 米国は 0、ファイルロケールは 1、ISO8601 は 2 です。
指定されていない場合、デフォルト値は 0 です。
For FileMaker Data API, the Get a Single Record by ID, Get Records, and Find Records endpoints now include the optional dateformats parameter, which controls the format of date and timestamp fields returned by FileMaker Data API: 0 for US, 1 for file locale, or 2 for ISO8601.
If not specified, the default value is 0.
dateformats = 0 の場合は、米国
{
"layouts": "blank",
"query": [
{
"日付": "03/01/2024"
}
],
"dateformats": 0 <- 米国
}
{
"response": {
"dataInfo": {
"database": "blank",
"layout": "blank",
"table": "blank",
"totalRecordCount": 1,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
"タイムスタンプ": "03/01/2024 09:10:20", <- 米国
"日付": "03/01/2024" <- 米国
},
"portalData": {},
"recordId": "1",
"modId": "4"
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
dateformats = 1 の場合は、ファイルロケール
{
"layouts": "blank",
"query": [
{
"日付": "03/01/2024"
}
],
"dateformats": 1 <- ファイルロケール
}
{
"response": {
"dataInfo": {
"database": "blank",
"layout": "blank",
"table": "blank",
"totalRecordCount": 1,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
"タイムスタンプ": "2024/03/01 09:10:20", <- ファイルロケール
"日付": "2024/03/01" <- ファイルロケール
},
"portalData": {},
"recordId": "1",
"modId": "4"
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
dateformats = 2 の場合は、ISO8601
{
"layouts": "blank",
"query": [
{
"日付": "03/01/2024"
}
],
"dateformats": 2 <- ISO8601
}
{
"response": {
"dataInfo": {
"database": "blank",
"layout": "blank",
"table": "blank",
"totalRecordCount": 1,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
"タイムスタンプ": "2024-03-01T09:10:20", <- ISO8601
"日付": "2024-03-01" <- ISO8601
},
"portalData": {},
"recordId": "1",
"modId": "4"
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}