I have an excel js add-in with custom functions, some of them should return date and here I have a problem:
- I can format and display this date as a string but in this case, I can't use this date as a date in formulas. or
- I can cast it '.ToOADate', and use it everywhere as date, but it looks like a number but not date until I set correct number format manually.
so here is the question: can I set a 'short date' number format programmatically as it happens when I use '=DATE' function?