Rijnsent
Well-known Member
- Joined
- Oct 17, 2005
- Messages
- 1,426
- Office Version
- 365
- Platform
- Windows
Excel Formula:
=LAMBDA(anything,
LET(
dt,45408,
chars, SEQUENCE(26, 1, 97, 1),
charText, CHAR(chars),
yearMatch, INDEX(charText,MATCH("24",IFERROR(TEXT(dt,charText),""),0)),
monthMatch, INDEX(charText,MATCH("4",IFERROR(TEXT(dt,charText),""),0)),
dayMatch, INDEX(charText,MATCH("26",IFERROR(TEXT(dt,charText),""),0)),
REPT(yearMatch,4) & "-" & REPT(monthMatch,2) & "-" & REPT(dayMatch,2)
)
)
LOCAL_YMD | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | |||||
2 | =LOCAL_YMD(0) | ||||
3 | yyyy-mm-dd | ||||
4 | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2 | B2 | =FORMULATEXT(B3) |
B3 | B3 | =LOCAL_YMD(0) |
Lambda Functions | ||
---|---|---|
Name | Formula | |
LOCAL_YMD | =LAMBDA(anything, LET( dt,45408, chars, SEQUENCE(26, 1, 97, 1), charText, CHAR(chars), yearMatch, INDEX(charText,MATCH("24",IFERROR(TEXT(dt,charText),""),0)), monthMatch, INDEX(charText,MATCH("4",IFERROR(TEXT(dt,charText),""),0)), dayMatch, INDEX(charText,MATCH("26",IFERROR(TEXT(dt,charText),""),0)), REPT(yearMatch,4) & "-" & REPT(monthMatch,2) & "-" & REPT(dayMatch,2) ) ) |
Comes from this thread: LAMBDA function and its conversion options for locals / regions
Last edited by a moderator:
Upvote
0