Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Date conversion, posted by Martin Neumann on Tue Feb 23 12:12:14 2021 
    icon2.gif   Re: Date conversion, posted by Andreas Luedeke on Tue Feb 23 17:20:39 2021 
       icon2.gif   Re: Date conversion, posted by Martin Neumann on Wed Feb 24 08:44:42 2021 
          icon2.gif   Re: Date conversion, posted by Sebastian Schenk on Tue Mar 2 15:17:56 2021 
    icon2.gif   Re: Date conversion, posted by Stefan Ritt on Wed Mar 10 17:30:23 2021 
Message ID: 69316     Entry time: Wed Mar 10 17:30:23 2021     In reply to: 69308
Icon: Reply  Author: Stefan Ritt  Author Email: do stefan.ritt@psi.ch 
Category: Question  OS: Linux  ELOG Version: V3.1.4-80633ba 
Subject: Re: Date conversion 

Do you actually need to convert the date into the internal format? Why not keeping simply the full string YYYY-MM-DD HH:MM. If the use is disciplined enough to always use the correct format, there should be no issue. I invented the datetime format to "force" all date/time inputs to have the correct format. If you have a proper YYYY-MM-DD HH:MM format, even sorting (now by string) should work correctly.

Martin Neumann wrote:

Hi,

I am trying to figure out how ELOG works and I have a problem.

I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons.

How do I manage that this input is converted correctly into the internal format?

I tried adding a hidden locked Attribute called IntDate and use "Subst IntDate = $start" but the result is dates in 1970, even though I have set the Time Format to "%F %H:%M"

 

ELOG V3.1.5-fe60aaf