I am working on a mobile application in which I keep data in my device database, one of those fields is the date and time but when I want to insert these fields from my application to Oracle, it marks me an error the format of the date which I have it in the following way
public static String fecha(){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String currentDateandTime = sdf.format(new Date());
return currentDateandTime;
}
This method I use to insert my data
And with this line is what I call my method
String fechaR = manejoDeDatos.fecha();
manejoDeDatos.registrarResultados(mContext, String.valueOf(intentIdUsuario), resultadoQR, fechaR);
To test if my web service inserts, I'm using postman and that's where the error marks me
In my stored procedure I have
create or replace PROCEDURE SP_AR_INSERT_JSON_APP(
ID_USUARIO IN NUMBER,
INFORMACION_QR IN NVARCHAR2,
FECHA IN DATE,
ID_NUEVO OUT NUMBER )
AS
BEGIN
INSERT INTO XXVIA_LM_TB_ANES_RESULTADOS
(NUMB_ID_RESULTADOS,
DATE_FECHA_HORA_INICIO,
NUMB_ID_USUARIO,
VCHA_INFORMACIONQR)
VALUES
(((SELECT NVL(MAX(NUMB_ID_RESULTADOS), 0) FROM XXVIA_LM_TB_ANES_RESULTADOS) + 1),
FECHA,
ID_USUARIO,
INFORMACION_QR)
RETURNING NUMB_ID_RESULTADOS INTO ID_NUEVO;
COMMIT;
END SP_AR_INSERT_JSON_APP;
If you need any other information, I'll gladly share it with you. By pure chance, someone knows how to solve this error, if you could guide me, I would appreciate it very much.