Solved

y2k problem

Posted on 2001-06-28
6
154 Views
Last Modified: 2010-05-18
I record a macro in excel2000 My 1st column has data & time as dd/mm/yyyy HH:MM:SS.sss AM/PM.By format cell I format to date.When I do in windows98 the data is converted as ex 29/06/2001.When I do the same in windows95 the data is converted as ex 29/06/1900.Why is this so.In both PC I instaled Office2000.But the OS is windows98 & winwows95.I copy the macro & run it in VB6.
0
Comment
Question by:ns_kishorekumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:deighton
ID: 6237186
You might need to apply a Y2K upgrade to the win 95 O/S
0
 

Author Comment

by:ns_kishorekumar
ID: 6237285
How to apply the update for y2k
Buy the date is displayed as  dd/mm/yyyy ie I am getting 29/06/2001.If I see the regional settings.
0
 
LVL 18

Expert Comment

by:deighton
ID: 6237954
So if you format date

01/15/00 to dd/mm/yyyy it becomes 15/01/1900 in win 95 & 15/01/2000 in the win 98 machine - is that the problem?

Is the date on the win 95 machine correct?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Accepted Solution

by:
deighton earned 50 total points
ID: 6237967
Could you sho9w us the macro?
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6243331
ns_kishorekumar,

Use my below link to test Y2k compatibility.
http://www.freevbcode.com/ShowCode.Asp?ID=627

Then use this to convert your system to Y2k compatible if it is not.
http://www.freevbcode.com/ShowCode.Asp?ID=205

hongjun
0
 

Author Comment

by:ns_kishorekumar
ID: 6243787
here is the macro.
This is a csv file format.My fist column has data & time
I copy the 1st column and insert it as 1st column And make the 1column as data by format cells and the 2nd column is formated to time.
Columns("A:A").Select
Selection.Copy
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.NumberFormat = "dd/mm/yyyy"
Columns("B:B").Select
Selection.NumberFormat = "hh:mm:ss AM/PM"
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L").Select
Range("L1").Activate
ActiveWindow.SmallScroll ToRight:=11
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U").Select
Range("U1").Activate
ActiveWindow.SmallScroll ToRight:=5
Range("C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U,W:W,X:X,Z:Z,AA:AA"). _
Select
Range("AA1").Activate
ActiveWindow.SmallScroll ToRight:=9
Range( _
     "C:C,E:E,F:F,H:H,I:I,K:K,L:L,N:N,O:O,Q:Q,R:R,T:T,U:U,W:W,X:X,Z:Z,AA:AA,AC:AC,AD:AD,AF:AF,AG:AG,AI:AI,AJ:AJ" _
     ).Select
Range("AJ1").Activate
ActiveWindow.SmallScroll ToRight:=2
Selection.Delete Shift:=xlToLeft
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question