© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
wolf5

Ordering with timestamp not working ;(

My query with REST API is below. I wonder why it is not sorting.
?order=created_at.desc
?order=created_at.desc
is not working as expected.
created_at
created_at
is a timestamp with timezone.

const res = await fetch(
    `${import.meta.env.VITE_SUPABASE_URL}/rest/v1/article?author=eq.0&select=*,author!inner(*)?order=created_at.desc`,
    {
    headers: {
        Range: '0-5',
        apikey: import.meta.env.VITE_SUPABASE_PUBLIC
    }
});
const res = await fetch(
    `${import.meta.env.VITE_SUPABASE_URL}/rest/v1/article?author=eq.0&select=*,author!inner(*)?order=created_at.desc`,
    {
    headers: {
        Range: '0-5',
        apikey: import.meta.env.VITE_SUPABASE_PUBLIC
    }
});
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Nested ordering not working in V2
SupabaseSSupabase / help-and-questions
4y ago
Can supabase order timestamp with timezone?
SupabaseSSupabase / help-and-questions
13mo ago
realtime with v2 not working
SupabaseSSupabase / help-and-questions
4y ago
Realtime not working with RLS
SupabaseSSupabase / help-and-questions
4y ago