Convert String to Date

This should work, just replace "sDate" with the field that you want
to convert:

date(tonumber(left(sDate,4)),tonumber(mid(sDate,5,2)),tonumber(mid
(sDate,7,2)))


Linda Lowney
Decoustics Limited



--- In vantage@yahoogroups.com, Dan Shallbetter <dans@s...> wrote:
> Gary,
>
> What field is it? Do a browse on the field it should tell you the
field
> type. You might need to change the format to YYYY,MM,DD for the
DateValue
> function to work.
>
> Dan Shallbetter
> States Electric Mfg.
>
>
> -----Original Message-----
> From: Gary Wassing [mailto:gwassing@s...]
> Sent: Wednesday, October 22, 2003 12:29 PM
> To: 'vantage@yahoogroups.com'
> Subject: RE: [Vantage] Re: Convert String to Date
>
>
> I've tried the isDate and it comes back false. The format is
yyyymmdd.
> cDate returns bad date format string.
>
> --
> Gary Wassing
> MIS
> SteelCraft Industries
> 519-271-4750 x227
>
>
> -----Original Message-----
> From: Brian Stenglein [mailto:bstenglein@c...]
> Sent: Wednesday, October 22, 2003 1:17 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Convert String to Date
>
>
> You can also use the CDate function to simply convert the data type
> from string to date, if that is what you want.
>
> Brian Stenglein
> Clow Stamping Co.
>
>
> --- In vantage@yahoogroups.com, Gary Wassing <gwassing@s...> wrote:
> > Is there any way in Crystal 8.5 to convert a string field to a
date
> field.
> >
> > --
> > Gary Wassing
> > MIS
> > SteelCraft Industries
> > 519-271-4750 x227
> >
> >
> >
> > [Non-text portions of this message have been removed]
>
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report
Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> <http://groups.yahoo.com/group/vantage/files/.>
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> <http://groups.yahoo.com/group/vantage/messages>
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/links
> <http://groups.yahoo.com/group/vantage/links>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> <http://docs.yahoo.com/info/terms/>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
>
<http://rd.yahoo.com/M=194081.4074964.5287182.1261774/D=egroupweb/S=17
050071
> 83:HM/A=1732163/R=0/SIG=11n0nglqg/*http://www.ediets.com/start.cfm?
code=3051
> 0&media=zone> click here
>
> <http://us.adserver.yahoo.com/l?
M=194081.4074964.5287182.1261774/D=egroupmai
> l/S=:HM/A=1732163/rand=867666485>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You
must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report
Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> <http://groups.yahoo.com/group/vantage/files/.>
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> <http://groups.yahoo.com/group/vantage/messages>
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/links
> <http://groups.yahoo.com/group/vantage/links>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
>
>
> [Non-text portions of this message have been removed]
Is there any way in Crystal 8.5 to convert a string field to a date field.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227



[Non-text portions of this message have been removed]
Gary,

Read the help on DateValue

Dan Shallbetter
States Electric Mfg.

-----Original Message-----
From: Gary Wassing [mailto:gwassing@...]
Sent: Wednesday, October 22, 2003 10:41 AM
To: 'vantage@yahoogroups.com'
Subject: [Vantage] Convert String to Date


Is there any way in Crystal 8.5 to convert a string field to a date field.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227






[Non-text portions of this message have been removed]
Gary,
From Crystal Help:

Action
DateValue (string) returns a Date value given a string that represents a
date from January 1, 100 through December 31, 9999.

DateValue (number) returns a Date value given a number of days starting from
December 30, 1899. Number can be positive or negative, and truncated if
fractional.

DateValue (dateTime) returns the date portion of a given DateTime value.

DateValue (YYYY, MM, DD) returns a Date value given numeric arguments of the
year, month and day.

Examples
The following examples are applicable to both Basic and Crystal syntax:

DateValue ("Dec 31, 1999")

Returns the Date value for Dec. 31, 1999.

DateValue (50)

Returns the Date value for February 18, 1900.

DateValue (#Oct. 20, 1999 12:02pm#)

Returns the Date value for October 20, 1999.

DateValue (1930, 7, 30)

Returns the Date value for July 30, 1930.

Comments
You can use the IsDate function to check if a String argument can be
converted to a Date before doing the actual conversion. That way, if the
conversion cannot be done, you can handle the situation appropriately.



Troy



-----Original Message-----
From: Gary Wassing [mailto:gwassing@...]
Sent: Wednesday, October 22, 2003 11:41 AM
To: 'vantage@yahoogroups.com'
Subject: [Vantage] Convert String to Date


Is there any way in Crystal 8.5 to convert a string field to a date field.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227



[Non-text portions of this message have been removed]
You can also use the CDate function to simply convert the data type
from string to date, if that is what you want.

Brian Stenglein
Clow Stamping Co.


--- In vantage@yahoogroups.com, Gary Wassing <gwassing@s...> wrote:
> Is there any way in Crystal 8.5 to convert a string field to a date
field.
>
> --
> Gary Wassing
> MIS
> SteelCraft Industries
> 519-271-4750 x227
>
>
>
> [Non-text portions of this message have been removed]
I've tried the isDate and it comes back false. The format is yyyymmdd.
cDate returns bad date format string.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227


-----Original Message-----
From: Brian Stenglein [mailto:bstenglein@...]
Sent: Wednesday, October 22, 2003 1:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Convert String to Date


You can also use the CDate function to simply convert the data type
from string to date, if that is what you want.

Brian Stenglein
Clow Stamping Co.


--- In vantage@yahoogroups.com, Gary Wassing <gwassing@s...> wrote:
> Is there any way in Crystal 8.5 to convert a string field to a date
field.
>
> --
> Gary Wassing
> MIS
> SteelCraft Industries
> 519-271-4750 x227
>
>
>
> [Non-text portions of this message have been removed]



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



[Non-text portions of this message have been removed]
Gary,

What field is it? Do a browse on the field it should tell you the field
type. You might need to change the format to YYYY,MM,DD for the DateValue
function to work.

Dan Shallbetter
States Electric Mfg.


-----Original Message-----
From: Gary Wassing [mailto:gwassing@...]
Sent: Wednesday, October 22, 2003 12:29 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Re: Convert String to Date


I've tried the isDate and it comes back false. The format is yyyymmdd.
cDate returns bad date format string.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227


-----Original Message-----
From: Brian Stenglein [mailto:bstenglein@...]
Sent: Wednesday, October 22, 2003 1:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Convert String to Date


You can also use the CDate function to simply convert the data type
from string to date, if that is what you want.

Brian Stenglein
Clow Stamping Co.


--- In vantage@yahoogroups.com, Gary Wassing <gwassing@s...> wrote:
> Is there any way in Crystal 8.5 to convert a string field to a date
field.
>
> --
> Gary Wassing
> MIS
> SteelCraft Industries
> 519-271-4750 x227
>
>
>
> [Non-text portions of this message have been removed]



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/.>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
<http://groups.yahoo.com/group/vantage/messages>
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
<http://groups.yahoo.com/group/vantage/links>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
<http://docs.yahoo.com/info/terms/>



[Non-text portions of this message have been removed]



Yahoo! Groups Sponsor

ADVERTISEMENT

<http://rd.yahoo.com/M=194081.4074964.5287182.1261774/D=egroupweb/S=17050071
83:HM/A=1732163/R=0/SIG=11n0nglqg/*http://www.ediets.com/start.cfm?code=3051
0&media=zone> click here

<http://us.adserver.yahoo.com/l?M=194081.4074964.5287182.1261774/D=egroupmai
l/S=:HM/A=1732163/rand=867666485>

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/.>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
<http://groups.yahoo.com/group/vantage/messages>
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
<http://groups.yahoo.com/group/vantage/links>

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]
You could use some "instr" functions to switch the string around to get it
into the correct format.

Troy Funte

-----Original Message-----
From: Dan Shallbetter [mailto:dans@...]
Sent: Wednesday, October 22, 2003 1:45 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Re: Convert String to Date


Gary,

What field is it? Do a browse on the field it should tell you the field
type. You might need to change the format to YYYY,MM,DD for the DateValue
function to work.

Dan Shallbetter
States Electric Mfg.


-----Original Message-----
From: Gary Wassing [mailto:gwassing@...]
Sent: Wednesday, October 22, 2003 12:29 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Re: Convert String to Date


I've tried the isDate and it comes back false. The format is yyyymmdd.
cDate returns bad date format string.

--
Gary Wassing
MIS
SteelCraft Industries
519-271-4750 x227


-----Original Message-----
From: Brian Stenglein [mailto:bstenglein@...]
Sent: Wednesday, October 22, 2003 1:17 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Convert String to Date


You can also use the CDate function to simply convert the data type
from string to date, if that is what you want.

Brian Stenglein
Clow Stamping Co.


--- In vantage@yahoogroups.com, Gary Wassing <gwassing@s...> wrote:
> Is there any way in Crystal 8.5 to convert a string field to a date
field.
>
> --
> Gary Wassing
> MIS
> SteelCraft Industries
> 519-271-4750 x227
>
>
>
> [Non-text portions of this message have been removed]



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/.>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
<http://groups.yahoo.com/group/vantage/messages>
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
<http://groups.yahoo.com/group/vantage/links>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
<http://docs.yahoo.com/info/terms/>



[Non-text portions of this message have been removed]



Yahoo! Groups Sponsor

ADVERTISEMENT


<http://rd.yahoo.com/M=194081.4074964.5287182.1261774/D=egroupweb/S=17050071

83:HM/A=1732163/R=0/SIG=11n0nglqg/*http://www.ediets.com/start.cfm?code=3051
0&media=zone> click here


<http://us.adserver.yahoo.com/l?M=194081.4074964.5287182.1261774/D=egroupmai
l/S=:HM/A=1732163/rand=867666485>

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
<http://groups.yahoo.com/group/vantage/files/.>
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
<http://groups.yahoo.com/group/vantage/messages>
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
<http://groups.yahoo.com/group/vantage/links>

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT




Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]