6

I found an excel formula that transforms calendar dates into Chinese lunar dates:

=TEXT(A1,"[$-130000]d/m/yyyy")

Say A1 is

08/12/2018

The output of the formula is

2/11/2018

How does this work? What is $? What is $-130000? The MS's help article on TEXT does not mention this.

What formula can I use to do the reverse calculation, i.e. from lunar calendar to solar calendar? $+130000 does not work.


Update

I just came across this answer on SO, which says [$-xxxx] is some locale code, which makes perfect sense to me. However, I cannot find any source says what locale 130000 represents.

7
  • 2
    The place where it should be explained is support.office.com/en-us/article/…, but it is not there either. If you put [$-130000]d/m/yyyy in the cell's custom format box, Excel transforms it to [$-,13]d/m/yyyy, and that indeed gives the same result as the original.
    – GSerg
    Dec 27, 2018 at 16:59
  • @GSerg looks like $- indicates some sort of encoding/decoding.
    – Anthony
    Dec 27, 2018 at 17:30
  • Also Excel converts [$-13F800]d/m/yyyy to [$-x-sysdate,13]d/m/yyyy, and [$-13F400]d/m/yyyy to [$-x-systime,13]d/m/yyyy...
    – GSerg
    Dec 27, 2018 at 21:08
  • From myonlinetraininghub.com/… we see that Excel can display dates in "different languages" where language ID is taken from "[$-ID]..." Dec 29, 2018 at 8:41
  • 1
    @АлександрЕрмолин yes, but what locale or language ID does 130000 represents? I can't find any reference.
    – Anthony
    Dec 29, 2018 at 14:36

1 Answer 1

2

If you are still looking for an answer about what does [$-130000] represent then check out my other answer here.

What does the 130000 in Excel locale code [$-130000] mean?

I am not certain how to do a reverse conversion. If you try to do the reverse of the above function, which would be...

=TEXT(A1, "[$-1010409]d/m/yyyy")

But this simply takes the presented date, and converts it to the stated format (i.e. it sees whatever in "A1" as a Gregorian date already)

1
  • So how should these IDs be included in parsing correctly into DateTime object?
    – swcraft
    May 4, 2020 at 23:42

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.