Solved

y2k problem

Posted on 2001-06-28
6
149 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
Comment Utility
You might need to apply a Y2K upgrade to the win 95 O/S
0
 

Author Comment

by:ns_kishorekumar
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 18

Accepted Solution

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

Expert Comment

by:hongjun
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now