Google sheets converts 01/01/0001 into 01/01/2001 - date

How to make it stops? Tried many different formattings and it gives no difference. Could not find anything in settings. Googling only gives how to stop google sheets from auto-formatting numbers into dates, which is not the problem.

also you could use:
="01/01/0001"
to calculate the age vertically try:
=SUMPRODUCT(REGEXEXTRACT(B1:B2, "\d{4}")*{-1; 1})
or horizontally:
=SUMPRODUCT(REGEXEXTRACT(A11:B11, "\d{4}")*{-1, 1})

Make sure to edit the number after setting the format as text. Below is an example of what I mean:

Related

Displaying tick labels with google flutter charts

We are trying to display a year's (12 months) worth of data on a chart. It is close to working but the labeling of the month is weird. It seems like random months are labelled and some are not.
We figured out how to make it work but don't understand why.
We are using a StaticDateTimeTickProviderSpec. When we set the format arg only (ex: "MMM"), it doesn't label some months. When we set the transitionFormat arg it works.
What is the difference between "format" and "transitionFormat"? The online docs are somewhat minimal.
Thanks,
Mike

How to vertically list all days of the month in Google Sheets

With Populate a Full Month’s Dates Based on a Drop-down in Google Sheets how to I was able to list all days of a month next to each other.
=TRANSPOSE(ARRAY_CONSTRAIN(ArrayFormula(date($A$1;MONTH(A2&1);1)+transpose(COLUMN($C$1:$BK$1)-3));DAY(EOMONTH(date($A$1;MONTH(A2&1);1);0));1))
What do I need to change in the current formula to list them below each other?
I am going to take a wild guess and say Erase the word "transpose()"
=(ARRAY_CONSTRAIN(ArrayFormula(date($A$1;MONTH(A2&1);1)+transpose(COLUMN($C$1:$BK$1)-3));DAY(EOMONTH(date($A$1;MONTH(A2&1);1);0));1)
Remove the TRANSPOSE function invocation:
=ARRAY_CONSTRAIN(ArrayFormula(date($A$1;MONTH(A2&1);1)+transpose(COLUMN($C$1:$BK$1)-3));DAY(EOMONTH(date($A$1;MONTH(A2&1);1);0));1)
EDIT
(Following your commentHow to vertically list all days of the month in Google Sheets)
I gave it a try but I got a Parse error.
ALWAYS CHECK YOUR LOCALE (when using copy/paste)
In your case you ONLY have to change , to ;.
So the formulas will be
For Horizontal
=TRANSPOSE(SEQUENCE(DAY(EOMONTH(A1&A2;0));1;A1&A2;1))
For Vertical
=SEQUENCE(DAY(EOMONTH(A1&A2;0));1;A1&A2;1)
Use twice and format accordingly.
Original answer.
Instead of that long formula try this one.
For Horizontal
=TRANSPOSE(SEQUENCE(DAY(EOMONTH(A1&A2,0)),1,A1&A2,1))
For Vertical
=SEQUENCE(DAY(EOMONTH(A1&A2,0)),1,A1&A2,1)
Use twice and format accordingly.
That`s great but the dates I am getting are not in a chronological order since their "code" is something like 44324 and they are order by it.

How to type in multiple spaces in mermaid?

I'm using VS Code to edit my markdown file, and need to make flowcharts (graph) to display workflow.
The problem is VS Code will not properly display the long text title, the last few part will be truncated as showed in follow:
```mermaid
graph LR
azzzzzzzz-->b
```
So I'm thinking of simply adding space after the text. However, I searched through the internet, and cannot find a way to type in multiple space.
```mermaid
graph LR
a[zzz z zzzz ]-->b
```
No matter what I try, the actual title will only display 1 space only. So if anyone can help either on truncate issue of VS Code or teach me how to type in multiple space.
I've been struggling with it for whole day, please help! Thanks a lot!
According to documentation Entity codes to escape characters you have to use the following:
It is possible to escape characters using the syntax examplified here.
graph LR
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
In your example it could be the following:
```mermaid
graph LR
a["zzz #nbsp; z #nbsp; zzzz #nbsp; "]-->b
```

Bulk change date to present date with ExifTool

I have a bunch of images with different create dates. I want to normalize them all to a given date (say today's date) using a batch file (Windows). Can ExifTool set dates? I only see documentation and examples for shifting dates. To shift the date to present, I would need to somehow read the date for each file, calculate the difference, and then shift. That would be ok, but I don't know how to read the create date into a variable using ExifTool.
One obstacle for me is that I don't speak Perl. I do Python, and there is pyexiv2. This allows to write the "date", but I can't see anywhere if that is just create date or all dates.
Edit
Here shows using, for example,
exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg
in Ubuntu linux, but I could not get that to work in Windows.
As a hack, I tried
exiftool -AllDates+=2015:03:02 IMG_8220.JPG
which set the dates to the time executed, probably because the shift was so completely crazy. But I'd like to have control, and, specifically be able to change YYYY:MM:DD without changing the time.
Consequently, help still appreciated.
I crossposted to the ExifTool forum, and ExifTool author Phil Harvey responded that you need to use double quotes. The single quotes from the linked blog post don't do it in Windows.
So, one would use
exiftool -AllDates="2010:08:08 15:35:33" IMG_01.jpg
I tested it and (of course) it worked.

How to check the timestamp of a command from command history in Matlab?

I was wondering is it possible to check the timestamp of a command in Matlab? If I look at the command history I can see the timestamps separating the commands of different dates for example:
But is it possible to get the timestamp of a particular command? =)
Thank you for any advice
The behavior you are looking for is not native to MATLAB.
BUT using this custom Command Prompt you can achieve it.
Hope it helps!
Did you ask Google before posting? 4-th result says it's all written in ˙history.m`
This link explains that you can check history by typing history in the command line. By default this won't get you timestamps. But setting the output format:
export HISTTIMEFORMAT=' %F %T '
your history will give you timestamps.
As an update to #dedek-mraz's answer, and for future reference: I have located the file History.xml in %appdata%\MathWorks\MATLAB\R2018a(Windows 10), which you can open and search by your favorite text editor.
Then I went to Command History in Matlab GUI and scrolled backwards to the respective day. Not very elegant, but it worked.