# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Formula for date format identification

Hi All,

Is there a formula that can get a date and return it's format?

Example:

Input: 31122015 Output: DDMMYYYY

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Formula for date format identification

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...

6 Replies
MVP

## Re: Formula for date format identification

You might be able to create one... but the issue will be for an input like this 01022015... is this DDMMYYYY or MMDDYYYY?

Valued Contributor III

## Re: Formula for date format identification

Hi Yaniv,

=Date(Date#('31122015','DDMMYYYY'),'DD-MM-YYYY')

Thanks,

Arvind Patil

Valued Contributor III

Thanks,

Arvind Patil

MVP

## Re: Formula for date format identification

Arvind OP is looking to get the format as an output

When the user enters 31122015, they need to see DDMMYYYY

Contributor

## Re: Formula for date format identification

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)

MVP

## Re: Formula for date format identification

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...