Author Topic: Error after ColModel Date Format in result view  (Read 123 times)

necatiozbek

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 19
    • View Profile
Error after ColModel Date Format in result view
« on: July 25, 2024, 09:50:53 pm »
Hi;

My Database incoming date value is as follows : '07.06.2023 14:35' > day.month.year

In ColModel, I format the date field as dataIndx: "ISLEM_TARIHI", dataType: "date", format: 'dd.mm.yy',  or format: 'dd.mm.yyyy',

For example, if the incoming data is 07.06.2023, the date shown in the grid is 06.07.2023.( first attached picture) -day and month change places

If I don't format the Date field in colModel the view is correct  > dataIndx: "ISLEM_TARIHI", dataType: "date" > result second picture

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Error after ColModel Date Format in result view
« Reply #1 on: July 26, 2024, 11:25:22 am »
dataType: date is used for date or datetime fields. It should be valid javascript recognizable date in either of these formats:

mm/dd/yy e.g., 07/04/1776
ISO 8601 format yy-mm-ddThh:mm:ss e.g., 1776-07-04T08:20:01 or 1776-07-04

https://paramquery.com/pro/api#option-column-dataType