osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

jilian to Gregorian date conversion error


On 2018-04-24 23:37, sum abiut wrote:
> Hi,
> 
> i get the error message:
> 
> an integer is required
> 
> when i am try to convert from julian date to  Gregorian date
> 
> in my view.py, after i have query the db i want to convert the applied date
> from julian date to Gregorian date but i got the above error,
> 
> convert_date=(datetime.date.fromordinal(rate.columns.date_applied))
> 
> 
> sum,
> 
datetime.date.fromordinal expects an integer, but the value of 
rate.columns.date_applied is not an integer.

Also, the integer is interpreted as a "proleptic Gregorian ordinal", not 
a Julian date.