Do we have any tailf extension to get current date

do we have tailf extension to get current date


You can populate the database with the current date or register a callpoint to return the current date when requested.

See for example “type yang:date-and-time” in examples.confd/cdb_oper/loadhist/load.yang

i want the current date and time as part of show template.
is there any way i can do this

There is no built in variable. But you can for example have a

leaf mydate {
   config false;
   tailf:callpoint mydatacp;
   type xyz;

that you refer to from the cli-template-string

can i use tailf:exec ‘date’ to execute os date command instead of callpoint


I assume you mean as part of an action. The action will not be executed when someone does a show of your operational data, so you need to use a callpoint, i.e. implement a data provider in C, Java, Python, or Erlang code that registers for the callpoint and provide the current date / time on request.