0
datetime을 유닉스 타임 스탬프로 변환하려고합니다. 몇 가지 방법을 시도하고 오류가 모두 동일합니다. 나는 내가 무엇을하기로되어 있는지 잘 모른다.function UNIX_TIMESTAMP가 없습니다.
date_joined
는 포스트 그레스는 (see here) 그렇게 못하게하기 때문이다이 2017-09-30 10:24:44.954981+00:00
function unix_timestamp(timestamp with time zone) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
User.objects.annotate(photo_time=Func(F('date_joined'),function='UNIX_TIMESTAMP'))
User.objects.extra(select={'photo_time':"to_unixtime(date_joined)"})
#also tried and UNIX_TIMESTAMP