Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pavanthota
Creator
Creator

Convert date format to numeric

Hi,

i have  data in date format of  one of my filed i want to convert the date format to numeric can anyone help me soon

The date format is mm/dd/yyyy(if the date is above 9th) otherwise mm/d/yyyy

Thanks,

Pavan

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Pavan,

As Stefan points out, you will need to use the Num() function, and the Date#() format in case your local date format is not the same:

Num(Date#(Field, 'MM/DD/YYYY')) AS NumericDate

Hope that helps.

Miguel

View solution in original post

7 Replies
swuehl
MVP
MVP

Pavan,

if your dates field are of date data type, QV will hold the values with a textual as well as a numerical representation.

So if your standard date format is set to 'MM/D/YYYY' (at top of your script),

QV should automatically read in your date field as date data type, and you can calculate with dates.

For example

=num(DATEFIELD)

should show you the numerical representation.

Miguel_Angel_Baeyens

Hi Pavan,

As Stefan points out, you will need to use the Num() function, and the Date#() format in case your local date format is not the same:

Num(Date#(Field, 'MM/DD/YYYY')) AS NumericDate

Hope that helps.

Miguel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

     Num(DATE#(DateField,'MM/D/YYYY'))

Celambarasan

pavanthota
Creator
Creator
Author

Hi ,

I am new to the qlikview can anyone give me brief details on Date how it works in qlikview and date functions.

if it is any pdf or doc its more helpful

Thanks,

Pavan

Miguel_Angel_Baeyens

Hi Pavan,

You are lucky! Henric Cronström just wrote a very interesting blog post last week in regards to dates, very illustrative and detailed, that goes together this interesting PDF document. A must read if you want to know how dates work and why work the way they work in QlikView.

Hope that helps.

Miguel

pavanthota
Creator
Creator
Author

Hi Miguel,

Thanks for ur help its most valuable PDF  for me. can u get a chance please take a look one of my post and give me reply

My Post Name: "Difference between MSQ and Standard

Not applicable

Hi, Pavan.

As for me, I have seldom tried to convert the date format to numeric. I wonder have you ever worked it out? Do I need another 3rd party manual toolkit? When it comes to PDF converting process, I have another question, I wonder have you ever tried to convert pdf to other image files before? As for myself, I am testing the related PDF to PNG converting, PDF to BMP converting , and PDF to JPG converting programs these days.  Do you have experience about it? Any suggestion will be appreciated. Thanks in advance.                        

Best regards,

Lee