Date format on plain file

Asked by gagudelo

I would like to understand the date number on the plain file, tag <ope date="######". How do you convert the 1st May 2009 into that number? Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
HomeBank Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Maxime DOYEN (mdoyen) said :
#1

that simple, its julian date !

Revision history for this message
Maxime DOYEN (mdoyen) said :
#2

I mean from glib point of view so:
Julian day number (days since January 1, Year 1)

Revision history for this message
Amol (amol9435) said :
#3

There is definitely some bug. I am getting: 736158 for 13.07.2016

Revision history for this message
Graham Voisey (vernalbehemoth) said :
#4

To Convert the string "date" in the xhb file into a date you will need to add the number of days in the "date" string to the date "01-01-0001".

Hope this helps someone.

Here is an example in C#:

            int julianDate = 737337;

            DateTime dt = new DateTime(01,01,01);

            dt = dt.AddDays(julianDate);

returns "2019-10-06"

Can you help with this problem?

Provide an answer of your own, or ask gagudelo for more information if necessary.

To post a message you must log in.