40
Views
4
Comments
The Outsystems function (CurrDateTime()) gives the current Date Time with Millisecond

Hi All,

I have created one Entity and one Attribute [CreatedOn (DateTime)]. I'm getting the Millisecond value of a Date Time data type only for this field.  Kindly review below screenshot for more details.


Also, I am having another Attribute called UpdatedOn with same Date Time data type and its returning data in DD/MM/YYYY HH:MM:SS format. 

Kindly suggest me how I can remove the Millisecond value from the date time object.

Thanks,

Deepak


2026-01-28 16-57-48
Mihai Melencu
Champion

Hi @Deepak Gour ,

You can use the FormatDateTime() function to format the date the way you want.

You can find more information about this function here: Format | Outsystems 11 .

Alternatively you can build your date by using NewDateTime() .

UserImage.jpg
Deepak Gour

Hi @Mihai Melencu 

Thanks for reply!!

My concern is why only this Attribute (CreatedOn) returning the value including millisecond?

Other Attributes with same datatype are working fine.

Thanks

2026-01-28 16-57-48
Mihai Melencu
Champion

As per documentation:

It depends on how you handle the population of these attributes.

2023-03-13 10-26-05
Sriyamini

Hi @Deepak Gour,

if you could share your .OML file or provide more details on how you have configured the CreatedOn and UpdatedOn attributes. I can understand how they are being handled and suggest a solution for why the CreatedOn field is returning milliseconds while the UpdatedOn field does not.


By reviewing the logic and formatting applied to these fields. I will be able to know the cause of the difference and provide a solution. 

Thanks,

Sriyamini.J

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.