DateTime error with the time part

DateTime error with the time part

  

Hello everyone.

I´m new to outsystems and im having a issue with the currDatetime() Function in a mobile app, I have a control table that keeps records from a check in until a check out is done by the user So when the user checks in i record the datetime with currdatetime() and that works just fine, but when the user checks out and i try to record the checkout datetime it changes the date correctly but leaves the time at 00:00:00.

When checking out what i do is update the control Table with the currdatetime for the checkout and export everything to the final table before deleting the control entry for that user.

This is the update query im using:

SyntaxEditor Code Snippet

UPDATE {CheckRegisterControl}
SET
{CheckRegisterControl}.[CheckOutDateTime] = @OutDate
WHERE 
{CheckRegisterControl}.[UserId] = @UserId 

Where  @outDate equals currDateTime() .

Does anyone knows why this happens and how to fix it? i´d really appreciate that.

Thank you

Hi,

Can you share the oml or screenshots of the entities ?

It could be a formatting thing, could be the tale-attribute is of Date instead of datetime...

even though if you use currDatetImet() and the attribute itself is of type Date, you will end up with  00:00:00




J. wrote:

Hi,

Can you share the oml or screenshots of the entities ?

It could be a formatting thing, could be the tale-attribute is of Date instead of datetime...

even though if you use currDatetImet() and the attribute itself is of type Date, you will end up with  00:00:00





Hi.


Thank you for your answer, the data types are correct, first thing i checked.

Hi,


I am sure everything is in order, however, since we are not able to see how/what you are doing for real, we only get to guess what might be wrong.

what version are you using?

do you do it on a client-entity or a server-entity ?


Hi Danilo,

As J. as said, most likely its a Date type that should be a Datetime.

Could you double check the places where you use the CheckOutDate. Look in particular for the Query parameter of you SQL Query:

Cheers,

José

Here it is:

J. wrote:

Hi,


I am sure everything is in order, however, since we are not able to see how/what you are doing for real, we only get to guess what might be wrong.

what version are you using?

do you do it on a client-entity or a server-entity ?



I´m using OS 10 and the update is being done on a server-entity

Solution

Hi Daniel,

I was talking about this one:

Cheers,

José

Solution

José Costa wrote:

Hi Daniel,

I was talking about this one:

Cheers,

José

Thanks a lot, i can´t believe i missed this.

I appreciate your time.


Cheers!


Hi,


Glad it is solved.

next time please provide a simple oml, much faster to determine the issue :)


Danilo Batista wrote:

Thanks a lot, i can´t believe i missed this.

I appreciate your time.


Cheers!


No problem. It happens.

Cheers,

José


J. wrote:

Hi,


Glad it is solved.

next time please provide a simple oml, much faster to determine the issue :)


I will , really gratefull for your help.

:)