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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:36:05+00:00 2026-05-12T20:36:05+00:00

Bakground: I’ve got a legacy app I’m working on that uses DATE types for

  • 0

Bakground:
I’ve got a legacy app I’m working on that uses DATE types for most time storage in the database. I’d like to try update some of these tables so that they can utilize time zones since this is causing problems with users in different areas from where the db is(see A below). This is for Oracle 10g.

Quetions:

1) Can I migrate this “in place.” That is can I convert like so

DATE_COL = type:DATE   =>    DATE_COL = type:TIMESTAMP

…or will I have to use a different column name?

Keep in mind that data needs to be retained. If this can be done semi-easily in a migration script it will work for my purposes.

2) Will this type of conversion be backwards compatible? We likely have some scripts or reports that will hit this table that we may not know about. We can probably deal with it but I’d like to know what sort of hornet’s nest I’m walking into.

3) What pitfalls should I be on the lookout for?

Thanks,

EDIT:
(partly in response to Gary)

I’m fine with a multi-step process.

1) move data to a new Timestamp column (caled TEMP) with some sort of conversion
2) drop old column (we’ll call it MY_DATE)
3) create new timestamp column with the old date column name (MY_DATE)
4) move data to the MY_DATE column
5) drop TEMP column

A Gary also wanted clarification on the specific timezone issue. I copied my answer from below to keep it more readable.

Basically the data will be accessed from several different areas. We need to be able to convert to/from the local time zone as needed. We also have triggers that use sysdate further complicating things. timestamp with time zone alleviates a lot of this pain.

Oh and thanks for the answers so far.

  • 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-12T20:36:05+00:00Added an answer on May 12, 2026 at 8:36 pm

    You could just run:

    ALTER TABLE your_table MODIFY your_date_column TIMESTAMP WITH TIME ZONE;
    

    But I would recommend adding a TIMESTAMP column to the table, using an UPDATE statement to populate, and drop the original date column if you so choose:

    ALTER TABLE your_table ADD date_as_timestamp TIMESTAMP WITH TIME ZONE;
    
    UPDATE your_table
       SET date_as_timestamp = CAST(date_column AS TIMESTAMP WITH TIME ZONE);
    

    The conversion is backwards compatible – you can switch back & forth as you like.

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

Sidebar

Related Questions

Background I have a web app that will create an image from user input.
Background: I'm working on a system where the developers seem to be using a
Background: I'm using Google's protobuf , and I would like to read/write several gigabytes
Background: I am attempting to do a couple of unit tests on AJAX requests
Background: I'm writing an installation for a SharePoint component. In addition to getting the
Background We have a Windows .NET application used by our field employees who travel
Background : I currently have a Web Forms, ASP.NET 3.5/C# application which I'm interested
Background: writing an automated release script to export changed files between versions from SVN
Background I'm trying to get obtain a unique identifier out of a computer and
Background: Our companies internal user's run our .Net programs on 10-20 windows terminal servers.

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.