Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

Re: Bad date format string in Crystal 2013

$
0
0

hi Bob,

 

you can use something like the following

 

stringvar s:= '20140405';

date(s[1 to 4] + '/' + s[5 to 6] + '/' + s[7 to 8])

 

and if you want to be safe and use a check, then you can use something this

 

stringvar s:= '20140405';

s:= s[1 to 4] + '/' + s[5 to 6] + '/' + s[7 to 8];

if isdate(s) then date(s);

 

-jamie


Viewing all articles
Browse latest Browse all 8545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>