30
Views
8
Comments
Solved
How to use current time and date and register it in tables?
Question


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

2026-01-19 17-09-56
Carlos Lessa
 
MVP
Solution

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:



Yes, I did the same as you did but no luck.

Please check the attached oml, thanks.


Hi, check your join condition and change the max record to 1, check on the oml

result

T1Operations1.oml
2018-06-05 16-54-03
Maria da Graça Peixoto

CurrDateTime() gives you the current data time from the server. If the user is in another Time Zone you have to do the calculation .

Regards 

Graça

PS Stay safe

2026-01-19 17-09-56
Carlos Lessa
 
MVP

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically


UserImage.jpg
Faris Abdullah Almozini

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



2026-01-19 17-09-56
Carlos Lessa
 
MVP

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:


UserImage.jpg
Faris Abdullah Almozini

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:



Yes, I did the same as you did but no luck.

Please check the attached oml, thanks.


T1Operations.oml
2026-01-19 17-09-56
Carlos Lessa
 
MVP
Solution

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:



Yes, I did the same as you did but no luck.

Please check the attached oml, thanks.


Hi, check your join condition and change the max record to 1, check on the oml

result

T1Operations1.oml
UserImage.jpg
Faris Abdullah Almozini

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:



Yes, I did the same as you did but no luck.

Please check the attached oml, thanks.


Hi, check your join condition and change the max record to 1, check on the oml

result

Thanks it wokrs! How do you I change the application time zone, I think it shows a different time zone because the time it shows is different then the time in my country with 3h gap.

2026-01-19 17-09-56
Carlos Lessa
 
MVP

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Carlos Lessa wrote:

Faris Abdullah Almozini wrote:


Hi,

I have a reporting forms, and it has a attribute for time and date of when the report is issued, but I want this to be filled automatically with currtime and currdate.

As soon as the reporter opens the form it registers the time and date, and after he submit it, it should be saved in the database.

Hi Farris, you have a function of CurrDate() on the place of the style class, there you should write a css class

Now ii you want to have the inout_date filled in automatically go to the entity and add CurrDate() to the default value of the entity that holds the date, check the pic


and as result, the date was filled automatically



Thanks for your response, I did like you said. After I published the application and opened the form the date keep showing like in the picture below:


I tried to change it from input to expression, but shows null date.



Can you upload the oml or show how you are retriving the date, or the input variable data type:

here is mine:



Yes, I did the same as you did but no luck.

Please check the attached oml, thanks.


Hi, check your join condition and change the max record to 1, check on the oml

result

Thanks it wokrs! How do you I change the application time zone, I think it shows a different time zone because the time it shows is different then the time in my country with 3h gap.

For timezone check this post:https://www.outsystems.com/forums/discussion/48321/how-to-config-timezone-in-personal-environtment/

Good, I could help you.

So if my solution or ideas was the one that solved your problem, please mark my answer as the solution and help me to grow my rank in the community, thanks and good code


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