import
pandas as pd
from
PythonApi
import
*
import
datetime
import
itertools
import
numpy as np
def
convert_to_datetime(date):
int_value
=
int
(date)
year
=
int_value
/
/
10000000000
month
=
(int_value
%
10000000000
)
/
/
100000000
day
=
(int_value
%
100000000
)
/
/
1000000
hour
=
(int_value
%
1000000
)
/
/
10000
minute
=
(int_value
%
10000
)
/
/
100
second
=
int_value
%
100
return
datetime.datetime(year,month ,day, hour, minute, second)
def
convert_to_time(date):
int_value
=
int
(date)
hour
=
(int_value
%
1000000
)
/
/
10000
minute
=
(int_value
%
10000
)
/
/
100
second
=
int_value
%
100
return
datetime.time(hour, minute, second)
def
convert_to_str(timestamp):
timestamp_str
=
str
(
int
(timestamp))
formatted_date
=
f
"{timestamp_str[:4]}-{timestamp_str[4:6]}-{timestamp_str[6:8]} {timestamp_str[8:10]}:{timestamp_str[10:12]}:{timestamp_str[12:14]}"
return
formatted_date