Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default datepicker on 1904 date spreadsheet

Hiya,

I am using a datetime picker from a userform and on change I populate a cell
on a spreadsheet which is using the 1904 date system (this is because it
needs to be able to view negative times).

The problem is that when the date is transferred from the date picker to the
spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
way of changing the date picker / VB times so that they are in the 1904
system?

Thanks,

Basil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default datepicker on 1904 date spreadsheet

Maybe just subtract 1462 before you assign the value to the cell?

Basil wrote:

Hiya,

I am using a datetime picker from a userform and on change I populate a cell
on a spreadsheet which is using the 1904 date system (this is because it
needs to be able to view negative times).

The problem is that when the date is transferred from the date picker to the
spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
way of changing the date picker / VB times so that they are in the 1904
system?

Thanks,

Basil


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default datepicker on 1904 date spreadsheet

Thanks Dave,

I actually tried that and it was subtracting 8 years instead of 4! At that
point I realised that I needed to add '.Value' after my object name to make
the spreadsheet undertsand the correct date. A bit of a weird one, but sorted
now.

Thanks for looking into it mate.

Basil

"Dave Peterson" wrote:

Maybe just subtract 1462 before you assign the value to the cell?

Basil wrote:

Hiya,

I am using a datetime picker from a userform and on change I populate a cell
on a spreadsheet which is using the 1904 date system (this is because it
needs to be able to view negative times).

The problem is that when the date is transferred from the date picker to the
spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
way of changing the date picker / VB times so that they are in the 1904
system?

Thanks,

Basil


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
1904 negative time Dale G[_2_] Excel Discussion (Misc queries) 5 November 22nd 09 09:44 PM
1900 vs 1904 date functions Mary Lou Excel Worksheet Functions 1 October 27th 08 03:43 PM
Is there a way to add a datepicker control to a cell in Excel? Hamid Komaïri Excel Discussion (Misc queries) 4 June 25th 08 01:43 PM
DATEPICKER CONTROL ibeetb Excel Programming 2 October 24th 03 06:30 PM


All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"