cancel
Showing results for 
Search instead for 
Did you mean: 

Did DVAL() function change in VC 7.31 SP6 ?

former_member213043
Active Participant
0 Kudos

Hi Gurus,

in my previous model working fine in VC7.01 SP3,  I used te DVAL() function. It was working great, but now, it does not convert the date the same way...

Does anyone know if the date conversion changed ? or could it be due to some other parameters ? like Unicode implementation ?

PY

Accepted Solutions (1)

Accepted Solutions (1)

former_member202465
Contributor
0 Kudos

Hi PY,

The basic conversion works for me. Could you detail more about what you see that goes wrong?

Thanks,

Udi

former_member213043
Active Participant
0 Kudos

Hi Udi

Actually, I receive the date from the BW query like that : YYYY/MM/DD, but it is a text format. So I used DVAL(YYYY/MM/DD) to transform it to a date in order to have access to the calendar match code. It was working fine.

Now with the same string, it does not transform the same way, and instead of having the date correctly updated, it takes some pieces of the year to create the day, and so on (I did not focus on the way it was playing with the digits...)

Could the DVAL() function behave differently depending on some parameters ? As it is a new install, the basis guys could have changed (not on purpose) some stuff...but I was not able to point out which parameters could be involved...

Thanks

PY

Former Member
0 Kudos

Hello PY,

I have checked the behaviors in 7.01 and in 7.31. In both releases the behavior is not correct. It very much depends what the input is.

After some more investigation I found that there is no place to enter the format in which the string should be converted to date and the format according to which the conversion is made is quite automatic and based on the separator. (It doesn't seems to be related to any personal settings for the user or in the server)

If string you are getting for the date is always in the same format as you described above (YYYY/MM/D), I can suggest a workaround, which is to replace the slashes (/) with hyphens ( - ) before sending the string to DVAL: =DVAL(REPLACE(@TXT1,"/","-"))

where TXT1 is the string containing the date

Hope it helps,

Hilla

former_member213043
Active Participant
0 Kudos

Hi Hilla

Thanks for the feedback! Actuallym, it did something ike what you said, but instead of using DVAL(), I separated the date into small pieces to concatenate them correctly....

Thanks a lot

PY

Answers (0)