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 6742399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:50:19+00:00 2026-05-26T11:50:19+00:00

I need to format my dates in sql server to the following format. 2010-09-09T23:59:00+0000

  • 0

I need to format my dates in sql server to the following format.

2010-09-09T23:59:00+0000

Any ideas how to achieve date time format using an SQL query?

  • 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-26T11:50:20+00:00Added an answer on May 26, 2026 at 11:50 am

    CONVERT will get you most of the way:

    DECLARE @d DATETIME
    SET @d = GETDATE()
    SELECT CONVERT(VARCHAR(30), @d, 126)
    

    The only thing this won’t give you is the timezone (because neither datetime nor datetime2 hold any timezone information). You’ll need to append this manuall – if you need any other timezone other than UTC, then you’ll need to store this in a separate field in your schema. See the MSDN for more on CONVERT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using SQL Server and VB6 Table1 Date Time 20090801 060000 20090802 162000 Date Format:
How do I retrieve a date from SQL Server in YYYY-MM-DD format? I need
I'm using the David Walsh PHP calendar script and need to format my date
I have birth dates stored as datetime in SQL Server 2008 like so: 2010-04-25
Using MySQL & SQL Server ID sDate 001 03/06/2010 002 07/08/2010 .... .... sDate
Using SQL Server 2000 dtptime - datetimepicker (Format: Custom Format(HH:mm) Query insert into table1
In SQL Server 2008 I need to update just the date part of a
Using SQL Server 2005 Tabl1 ID Date Intime Outtime 001 20101201 080000 180000 001
I need to store a specific time format in sql so I can ORDER
I'm working with an MS-SQL database with tables that use a customized date/time format

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.