Skip to content

Instantly share code, notes, and snippets.

@JorgeMichelena
Created September 19, 2022 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JorgeMichelena/3e74ee2090575a1d1f7f742aee70539d to your computer and use it in GitHub Desktop.
Save JorgeMichelena/3e74ee2090575a1d1f7f742aee70539d to your computer and use it in GitHub Desktop.
from datetime import datetime
now = datetime.now()
targets = Target.objects.filter(
    created_at__date=now.date,
    created_at__hour=now.hour,
    created_at__minutes=now.minutes
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment