LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculations with different date formats

Hi,

I have a date and time in a single cell in a worksheet, with the format
"dd/mm/yy hh:mm". I have written a function to determine what crew is
working at this particular time. However, VBA has the date format as
mm/dd/yy and this seems to give me the wrong answers. How can I force
VBA to interpret my date format correctly? The function code is as
follows:

Public Function Crew(DTS)
Dim BaseDTS, CrewShifts1, CrewShifts2
Dim ShiftsSince, LookupShift

BaseDTS = #5/2/2005# + 8 / 24 'May 2, 2005 08:00
ShiftsSince = (DTS - BaseDTS) * 2
etc etc
End Function

TIA,
Derek

 
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
Date Calculations Erika Excel Discussion (Misc queries) 3 April 8th 10 09:58 PM
Date Calculations before date entered Ma2Weir Excel Discussion (Misc queries) 8 February 1st 07 03:34 AM
Date calculations TJAC Excel Discussion (Misc queries) 4 May 24th 06 05:36 PM
Date calculations Brian Excel Discussion (Misc queries) 2 March 8th 06 08:43 PM
Date Calculations Carla Goodloe Excel Programming 1 April 8th 04 12:29 AM


All times are GMT +1. The time now is 08:52 AM.

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

About Us

"It's about Microsoft Excel"