Solved

y2k problem

Posted on 2001-06-28
6
153 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

830 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