OQL Date format

0
Hello.   I'm expoerting the data through the OQl Query in .csv format. This is the query that I have used.   SELECT LO.AssignedAs , LO.AssignedFrom  , LO.AssignmentDate From Management.History AS L Left Join L/Management.History_record/Management.Loan AS LO     The data is exported in .csv format, but the exported file uses the date format DD/MM/YYYY. I'm attempting to change the date format to MM/DD/YYYY. Is there a way to format date and time in OQL?   I have attached the sample exported data for reference.   Sample exported data   Thanks in Advance.
asked
2 answers
1

Hi Ragul,

maybe this can help,

CAST (w.DateField AS String) as DateField

https://docs.mendix.com/refguide/oql-cast/

 

Also you can visit to these forum questions:

https://community.mendix.com/link/space/app-development/questions/9285

https://community.mendix.com/link/space/app-development/questions/121018

https://community.mendix.com/link/space/databases/questions/110706

 

Let me know, if you have any issues,

Hope it helps!

answered
0

Hello Rishab,

 

By Adding the Query this SELECT  L.AssignedAs , L.AssignedFrom , L.AssignedTo , L.AssignmentDate , DATEPART(MONTH, L.AssignmentDate) +''-''+DATEPART(DAY, L.AssignmentDate)+ ''-'' +DATEPART(YEAR,L.AssignmentDate)  

 

FROM Management.AssignmentHistory AS LLEFT JOIN Management.AssignmentHistory_History/AssetManagement.History AS LD

 

the table seems like this the date is not concordinated instead of concordinate the value getting sum.

image.png

answered