Jump to content

Exact time of project creation for custom export


---
 Share

Recommended Posts

Hello!

I would like to do customised exports and add the exact creation time as Kiosk does it automatically.

I found "gom.app.project.project_creation_time" but it do not give us seconds and show information in another format.

What I would like to get is something like 2021_01_01_12_01_30 .

Thanks!

Link to comment
Share on other sites

  • 1 month later...

You can change any time format to any other by using Python's datetime's strptime- and strftime-methods like this:

# -*- coding: utf-8 -*-

import gom
from datetime import datetime

dt_str = gom.app.project.project_creation_time  # something like "02.06.2021 18:24"
dt = datetime.strptime (dt_str, "%d.%m.%Y %H:%M")
new_dt_str = dt.strftime ("%Y_%m_%d_%H_%M_%S")  # something like "2021_06_02_18_24_00"

Well - (micro)seconds will be zero anyhow.

I hope it helps.

Edited
Link to comment
Share on other sites

  • 1 year later...

Hi all,

I found this interesting Topic. Now I´m standing for a similar problem.

So, can you show me the file and the filepath, where can I find and change it?

Thanks in Advance,

Steve

Link to comment
Share on other sites

 Share

×
×
  • Create New...