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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:12:43+00:00 2026-06-13T22:12:43+00:00

I have a date (stored as a VARCHAR2) in a database with the format:

  • 0

I have a date (stored as a VARCHAR2) in a database with the format:

20090123_163842.865
yyyyMMdd_hhmmss.ttt

and I want to make a SQL sentence to obtain:

23/01/2009 16:38:42,865
dd/MM/yyyy hh:mm:ss,ttt

MY objective is to add it manually (I know that data can be exported from database, and imported into Excel, but I want to do it manually) to Excel as a recognizable Date.

How should my SQL sentence be?

I have tried to to it by:

select TO_TIMESTAMP(my_time_utc, 'YYYYMMDD_HH24MISS.FF3') from myTable

but I am only able to obtain:

2009-01-23 16:38:42.865

Thanks

  • 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-06-13T22:12:45+00:00Added an answer on June 13, 2026 at 10:12 pm

    It never ceases to amaze me how many people confuse these operations.

    First you need to convert the varchar ‘fake date’ to a real date: use to_date for this.
    Then you need to convert the date to a varchar for presentation: use to_char for this.

    select to_char(to_date(column, 'yyyyMMdd_hhmmss.ttt'), 'dd/MM/yyyy hh:mm:ss,ttt')
    from your_table;
    

    should do what you want.

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

Sidebar

Related Questions

I have a table in sql where the date format is stored in Hijri.
I have a database field where date is stored as DD/MM/YYYY format. Now what
I currently have a date that's being stored in my SQL database as a
I have a huge database in ms sql. I have a date stored into
Possible Duplicate: Format mysql datetime with php Well.. I have stored date(c) in Mysql
I have a Timestamp field in a WebSQL database that is stored like: /Date(1340420400000)/
I have a stored procedure that returns data in the format of: Date |
I have data stored as below in an MS Access database: Date User 20090101
I have a SQL server stored procedure which would accept date as input param
I have the following column date in a SQL Server database. The datatype is

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.