Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
soniasweety
Valued Contributor III

convert to num

Hi all

I have a field like   dateJo   values like   1-Apr-17   ,1-Jan-17  like so on

when I tried   num(dateJo) as  NewDate   it is giving me null

how to convert this?

Tags (2)
15 Replies

Re: convert to num

May be work like below?

LOAD Num(Month(Date(Date#(dateJo,'DD-MMM-YY')))) as dateJo Inline [

dateJo

1-Apr-17

1-Jan-17

];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: convert to num

Date may not necessary, But some case it will help you. For now, Even this will work

Num(Month(Date#(dateJo,'DD-MMM-YY'))) as dateJo

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
soniasweety
Valued Contributor III

Re: convert to num

thanks anil its working but

am concatenating two tables with same column  but

in one column   values showing like   1-Apr-17    and other table column values like below  2017-10-01 00:00:00.000

so how to workout this?  to get same result?

sasikanth
Valued Contributor III

Re: convert to num

HI ,

Try this

Num(Date#(dateJo, 'DD-MMM-YY')) as DateNum

Re: convert to num

I believe this should work

LOAD Num(Month(Date(Date#(dateJo,'DD-MMM-YY')))) as dateJo Inline [

dateJo

1-Apr-17

1-Jan-17

];

Concatenate

LOAD Num(Month(Date(Date#(dateJo,'YYYY-MM-DD hh:mm:ss.fff')))) as dateJo Inline [

dateJo

2017-10-01 00:00:00.000

];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: convert to num

Use Alt()

See in help menu

Regards,

Prashant Sangel

Great dreamer's dreams never fulfilled, they are always transcended.
sasikanth
Valued Contributor III

Re: convert to num

Hi Try this,

LOAD  alt(num(Date#(dateJo,'DD-MMM-YY')),num(Date#(dateJo,'YY-MMM-DD'))) as NewDate

Inline [

dateJo

1-Apr-17

17-Jan-01

];

Re: convert to num

This is not going to work, You need

sasi k wrote:

Hi Try this,

LOAD  alt(num(Month(Date#(dateJo,'DD-MMM-YY'))),num(Month(Date#(dateJo,'YY-MMM-DD')))) as NewDate

Inline [

dateJo

1-Apr-17

17-Jan-01

];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
soniasweety
Valued Contributor III

Re: convert to num

none of above working   its giving null