Miliseconds

  

Hi,

does OutSystems Datetime object suports miliseconds?

I'm trying to bootstrap an entity with a Datetime attribute from an Excel. This file contains data exported from an Oracle Database:

I'm struggling to find a way to correctly parse this field and store it in a Datetime object WITH the miliseconds.


Thanks,

Nuno

nope,


Perhaps you should consider storing the datetime_ms as a ticks-value in your database.

with an extension you should be able to do that.



Hi,

If you send that value as string and convert to Datetime in the extension when it returns to Outsystems the datetime will keep the MS and save them on database. If also you convert the datetime that comes from extension to string again you will see the MS.

Regards,

Marcelo

Hi,

Marcelo Ferreira wrote:

Hi,

If you send that value as string and convert to Datetime in the extension when it returns to Outsystems the datetime will keep the MS and save them on database. If also you convert the datetime that comes from extension to string again you will see the MS.

Regards,

Marcelo

does this approach also work if I need to update the Datetime from within OutSystems? For example, if I get the current datetime with milisecs from the extension, set the corresponding datetime entity attribute and then call the update method, does this retains the milisecs on the database?


And if I want to show a Datetime with milisecs on a screen, do I need to convert the datetime to a string with the extension and show the string on the screen and not the datetime, is that it?


Regards,

Nuno


Solution

Hi Nuno,

Yes you can save it in a entity attribute and it will save on DB. If you want to show on a screen you can convert to string the entity attribute you are saving on DB. 

Outsystems just don't give you out of the box tools to create the miliseconds but after you create it using the extension the datetime that you assign with that value from extension will have the miliseconds there and because of that you just need to format to text to see it.

Regards,

Marcelo

Solution

Ok, thanks Marcelo and J. :-)


Regards,

Nuno