Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there a formula that can get a date and return it's format?
Example:
Input: 31122015 Output: DDMMYYYY
Here is what I suggest
If(Num(Date#(DateField, 'DDMMYYYY')) > 0, 'DDMMYYYY',
If(Num(Date#(DateField, 'YYYYMM')) > 0, 'YYYYMM',
If(Num(Date#(DateField, 'YYYYMMDD')) > 0, 'YYYYMMDD',
..... and so on...
You might be able to create one... but the issue will be for an input like this 01022015... is this DDMMYYYY or MMDDYYYY?
Hi Yaniv,
Please Use Below Code:
=Date(Date#('31122015','DDMMYYYY'),'DD-MM-YYYY')
Thanks,
Arvind Patil
=Date(Date#('31122015','DDMMYYYY'),'Write Your Date Format Here')
Thanks,
Arvind Patil
Arvind OP is looking to get the format as an output
When the user enters 31122015, they need to see DDMMYYYY
Anything you know that already exists?
Regarding the issue you raised, I guess that is something that will have to be defined as a fixed property. When Day and month can be both, choose X. (Maybe according to country standard format)
Here is what I suggest
If(Num(Date#(DateField, 'DDMMYYYY')) > 0, 'DDMMYYYY',
If(Num(Date#(DateField, 'YYYYMM')) > 0, 'YYYYMM',
If(Num(Date#(DateField, 'YYYYMMDD')) > 0, 'YYYYMMDD',
..... and so on...