LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Check how date is entered

On 5/4/2018 8:42 PM, GS wrote:
...

Ambiguities arise when *numeric representation* displays as opposed to
*textual representation* displaying. Auric's code determines whether the
1st element represents d or m. Isn't this what the OP wants to figure out?

...

Yeah, but it depends on what point it is in the process; is it the format of
the cell that determines or the data string going into the cell? I was
presuming it was the latter in which case how the cell is formatted is the
answer to a question as to how Excel interpreted the string but doesn't
_necessarily_ mean that was what the date was from whence it came.


That's not how it works! Dates aren't strings same as currencies arn't strings!

Excel uses the *system* date format by default to display the 'DateSerial' in
the cell to determine the dmy/mdy of a date based on that system's date format.
So.., when working with a file created in XP that has date cells, the
DateSerial is used to determine the datevalue in later OSs. This avoids all
ambiguity as to the true date being displayed.

The ambiguity for the user arises when the cell format is numeric (05/04/2018)
if/when the system date format isn't known. Using a textual format eliminates
the ambiguity because it displays the month name based on the DateSerial of the
value in the date cell. (What's important to remember here is that what cells
display isn't necessarily what they contain; -what we see is just how the cells
are/were formatted to display their contents.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
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
Check for duplicate numbers from ones entered and anoter set Goldie Excel Programming 1 May 29th 09 08:47 AM
Dates - Need to display date one month prior to user-entered date brettopp Excel Worksheet Functions 13 December 3rd 07 05:58 PM
Date subtraction -How to not show negative when 2nd date not entered Edward[_2_] New Users to Excel 2 September 27th 07 03:03 PM
Check Mark appears when a letter is entered in a field Gina Excel Programming 2 February 22nd 07 08:23 PM
Macro to check if data has been entered Mike R. Excel Programming 1 December 20th 04 11:14 PM


All times are GMT +1. The time now is 05:41 AM.

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"