Current timestamp in Program rule

Hello,

Is there any way we can get current timestamp in program rule action? I know we have V{current_date}, but I need current time also to set up one of the field value.

Thanks in advance,
Hiral

1 Like

Hi @ramavat

Yes, there isn’t a ā€œcurrent_date_timeā€ variable.. what is your usecase for using ā€˜current time’? Time is also calculated during the event creation and can be retrieved through several ways. Would you share an example use case and how a real expression would look like? ā€œIf current_time is 12AM then…?ā€

This is probably a feature request, and it reminds me of another feature request which is to calculate the duration in a format the included hours, minutes, and seconds, but in the ticket there’s a discussion of the real-world use cases, Jira

Looking forward to learn more. Thanks!

We wanted to generate unique id using program rule. For example, person’s TEI, we have Person’s First name, last name and then want to add timestamp to make it unique.

Thanks,
Hiral