On 06/03/2026 06:30, Ramki S wrote:
Hi,

1. Can gretl recognize the ymd hms format dates automatically? 

It depends on what you mean by "automatically": gretl has several functions for manipulating calendar dates. Chapter 19 of the User's Guide is devoted to this. For example, if you read a csv file that looks like this:

datestr,x
"2025-04-06 12:00:00",22
"2025-04-06 12:30:00",24
"2025-04-06 13:00:00",45
"2025-04-06 13:30:00",NA
"2025-04-06 14:00:00",16

gretl will read column 1 as a string. You can convert it into the "Unix seconds" format using the function "strptime", as in

<hansl>
series ut = strptime(datestr, "%Y-%m-%d %H:%M:%S")
</hansl>

2. If the data is 30 min frequency data, how to tell gretl?

If you consider the day as the "larger" time unit, than you have 24 subperiods in a period and all you need to do is

<hansl>
setobs 24 1:1 --special-time-series
</hansl>

You can achieve the same effect via the GUI: go to the "Data" menu and choose "Dataset structure".

-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------