Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:27:37+00:00 2026-05-24T23:27:37+00:00

I am using the FullCalendar plugin for JQuery. This plugin passes a unix timestamp

  • 0

I am using the FullCalendar plugin for JQuery.

This plugin passes a unix timestamp to a url (both start and end times), which is then used to query the event objects in the database and pull out events which fall within the range of start-end.

However, I keep getting a validation error because the times in my database are stored as datetimes and the value I am comparing them to is a UNIX timestamp.

How can I compare these two dates when running a query?

def fetch_events(request):
    start = request.GET.get('start')
    end = request.GET.get('end')
    e = Event.objects.filter(start__gte=start, end__lte=end).values('id','title','start','end')
    data = simplejson.dumps(list(e), cls=DjangoJSONEncoder)
    return HttpResponse(data)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:27:38+00:00Added an answer on May 24, 2026 at 11:27 pm

    Try making a datetime object from a timestamp by using the datetime.datetime.fromtimestamp function. Here’s a quick demonstration:

    In [7]: import datetime
    
    In [8]: datetime.datetime.fromtimestamp(2344353453)
    Out[8]: datetime.datetime(2044, 4, 15, 19, 17, 33)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using the jQuery fullcalendar plugin but I've came across an issue regarding
I am using the jQuery Fullcalendar plugin (http://arshaw.com/fullcalendar). I am only using it for
Hello I'm using the fullcalendar jQuery plugin to create a calendar app. When I
I am using Jquery UI Dialog box with FullCalendar plugin. My problem is UI
I'm using Adam Shaw's fullcalendar jquery plugin and it works really well, after speaking
I have embedded the fullcalendar jquery control by using this code: $(document).ready(function() { var
I'm using the fullCalendar jQuery plugin and it has options for adding events to
I'm using the arshaw's FullCalendar jQuery plugin on ASP.NET 4. Everything is okay, the
I'm using the 'FullCalendar' jQuery plugin however the format of my date string data
I am using the FullCalendar jQuery plugin: http://arshaw.com/fullcalendar/ I am also using the example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.