• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Excel dates and conditional formatting

.. a little more on casting, because my original statement was unclear...

Class inheritance of objects is core to object oriented programming... for example, you might have a class definition that describes a "Fruit Object"... attributes may be "sweetness" and "color", lets just say. Things you can do to a fruit is "package it" and "ship it". Then you might have an "Apple Object" that inherits the Fruit class. The apple object may have attributes like "roundness" and "tree height"... and things you can do like "eat it" or "cut it". Maybe you cannot "peel it", but other objects that inherit the fruit class can. why do it like this? For efficiency and reuse of code. Very similar to how database schemas are designed for normalization (not repeating the same data over and over again, but relating it to another table that has that data stored in one row, instead of millions, and then reference that one row)... digressing... complex topic.
anyway, lets say your program is passed an Apple object that you want to ship... well, any fruit object can be shipped, all you have to do is Cast the apple UP to the fruit object. The programming interpreter (compiler, runtime engine, whatever) checks to see if the Apple inherits Fruit, and if it does, it can act on the object as a Fruit and perform the "ship it" routine.
Conversely, if you get some data that is a Fruit, but you don;t know what type of fruit, you can Cast it DOWN to the Apple and the Cast function will return a success or failure, indicating if the Fruit you have is of the class Apple.

You can technically use Cast on primitive variables (basic things like numbers and strings - which you can think of as a class, incorrectly... they are primitives, but can be viewed as a simple class of a single element. So you can try to Cast an Integer to a Float, and it might work... if the language is smart enough to get what you are really trying to do... but we don't call this Casting... we call this Converting.
 
No, it means Comma delimited values (the v is the hint)
Internally, Excel doesn't have any 'date' data types. It stores all data as either 'number' or 'text'. (Although for memory management purposes, it uses a few different numeric data types).

In Excel, any single precision floating point number could be a date and time. Or not. An Integer could be a date, or not. It's up to the user to decide - by applying a 'date' format to cells whose numerical content represents a date.
Attempting to take the integer and convert it back to a readable date does not work. That is what I mean by "corrupting your data".

Applying a 'date' format to a cell containing a single precision floating point number will display that number as a date/time in accordance with the formatting applied. Applying a 'date' format to a cell that contains text, will be ignored - because text cannot be a date, as far as Excel is concerned.

All computers are electronic idiots. The do EXACTLY what you tell them to do - but they don't EVER care if your instructions are stupid. Excel doesn't know what you want. It doesn't know whether 26 is your age in years, the number of widgets you sold today, the day of the month, the price of widgets in dollars, or the date 'January 26th, 1900'.
You're mistaken... perhaps you have little experience with importing data into Excel. I have 30+ years of it... It is simple to see for yourself that Excel "guesses" what your source data types are. Simply make your own CSV with text, numbers, and dates in a common format. You can even name it as a CST if you want to continue to call it the worng thing - Excel wont care. Import the CSV (not by just launching excel through the CSV file associaion... launch the import wizard). The wizzard will walk you through the import process, and one of the steps is identifying the data type for each column. It guesses the datatype for you, but you can override it.
Are you also unfamiliar with Regular Expressions (RegEx)? its a filtering / sorting / parsing language.. people use it in their scripting to determine if a string of characters is a SSN, a Credit Card number, a phone number, a zip code... if it looks like a proper name (proper case - that's when each word begins with a capitol letter)... anyway, computers are dumb without programming, but Excel has sufficient programming to leverage that sort of intelligence and makes a pretty good effort to understand the difference between text, integers, floats, and dates.
So you need to tell it. If you don't tell it, it will assume that nothing's changed. If you tell it, but don't know you told it (for example because you run a data import utility or wizard that casts text data from a .csv file to a different data type), then you can expect to become confused.
Casting is completely different and unrelated to data type detection. Casting is a check to see if two classes of objects are compatible... usually because one inherits the other.
If you use a tool without understanding what it does, it is not the fault of the tool if the result isn't what you imagined it might be.

ok kid, whatever you say. I'd be embarrassed if I were you (and didn't lose my humility in the processes of becoming you).

Well, [Edited] then.

Feel free to continue to be enraged by the consequences of your own incompetence - I have no further interest in trying to help you.

By the way:

In computing, a comma-separated values file is a delimited text file that uses a comma to separate values
(Wikipedia)

Have a nice day; I hope your arrogant and misplaced condescension doesn't stop you from ever solving your problem, despite driving away those who might care to provide free advice. Clearly you know everything ablut the subject, and the fact that you have a problem is therefore somebody else's fault. :rolleyes:
 
The thread is about a simple matter of how to format using Excel. It does not have to be a battle of personal egos. Please let those go, everyone.
 
The thread is about a simple matter of how to format using Excel. It does not have to be a battle of personal egos. Please let those go, everyone.
I agree. Formatting in Office sucks. Conditional Formatting is a really cool concept, but Excel manages to make it a pain in the ass based on its desire to add syntax and not provide a live view of what you are trying to accomplish. Much like how Word manages to take something potentially useful like Styles and make it a pain in the ass.
No, it means Comma delimited values (the v is the hint)
Delimited begins with an 's'?
ok kid, whatever you say. I'd be embarrassed if I were you (and didn't lose my humility in the processes of becoming you).
At any point, you can feel free and actually provide an example. Otherwise, why are you complaining?
 
Last edited:
At the risk of being pedantic, CSV stands for Comma-Separated Values.

And I agree, this thread is getting way too insulty for the benign subject matter. Can't we accuse each other of being assholes over Donald Trump or something?
 
At the risk of being pedantic, CSV stands for Comma-Separated Values.

correct... with the hyphen and everything... I typoed a D for delimited while focusing on the V for values because the context of that part was the Excel import wizard which uses the term delimited versus fixed length (because it takes any text file that has some character delimiting values, a CSV is just one standard format of such a file format. the file itself is a text file, as opposed to binary.. as in, it is a simple ASCII encoding of textual representations of data. This does not speak to the nature of data therein.. just the format in which a program will access it to consume the data.
And I agree, this thread is getting way too insulty for the benign subject matter. Can't we accuse each other of being assholes over Donald Trump or something?

Seriously... I asked a related question about Excel date formatting woes and got:
bilby said:
That's nonsense......

...If you don't know what data you are handling, or what formats you are using, or if you confuse data with formats, then that's on you.

and then upon attempting to explain better, I get:
bilby said:
If you use a tool without understanding what it does, it is not the fault of the tool if the result isn't what you imagined it might be.

or, maybe, you are continuing to not understand the issue. but either way...
bilby said:
Well, Edited then.

Feel free to continue to be enraged by the consequences of your own incompetence - I have no further interest in trying to help you.

... how is that an appropriate way to "help"?

Jeez.
 
Last edited by a moderator:
Back
Top Bottom