Link to home
Start Free TrialLog in
Avatar of Alfredo Luis Torres Serrano
Alfredo Luis Torres SerranoFlag for United States of America

asked on

Varchar to datetime

Hi experts,

  I have a sql table in an sql database version 7.0 and i have a CallCenter software called Telephony@Work
CallCenter@nywhere 5.0 but in the table that holds the date of the and time of the call is avarchar
field and the people that make the software toll me to use this formula to convert that field to a valid
date field:

 Validdate = Date(Value in the field)/86400+Date("1970,1,1")-4/24)

 This formula works great on MsAccess but when i try to put this formula in crystal reports i receive an error tellin me that the number of days is too large or is not an integer.

What i am doing wrong.

Thanks
Avatar of Mike McCracken
Mike McCracken

Missing a parenthesis

Change it to

Validdate = Date((Value in the field)/86400+Date("1970,1,1")-4/24)

mlmcc

Avatar of Alfredo Luis Torres Serrano

ASKER

As you must know the parenthesis is not the only mistake in the text because in crystal reports the function date can not be date("1970,1,1") must be date(1970,1,1) but those are not the real problem.

Still waiting for the experts
Try

Validdate = Date((Value in the field)/86400+DateValue("1970,1,1")-4/24)

If that doesn't work, what does the "Value in the field" look like.  Provide a some sample values.

mlmcc
Datevalue is not a formula in crystal reports 8.0

The field looks like: 1012853835 For 04/02/02 04:17:15 p.m.
Applying the formula in MsAccess.

The date format is dd/mm/yy because i am in Venezuela
DateValue is a formula in my CR.  
It is in the Functions column under the subgroup Date/Time

Maybe you didn't do a full install?
Field looks like the number of seconds from some date (thats what i expected it to be the way the conversion was being doen.)

Let me try the formula with that value.

mlmcc

ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do you need anything more?

mlmcc
This question has been classified abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.
 

Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

 
If the user does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp 

mnye
EE Cleanup Volunteer