Dates dates dates 
Author Message
 Dates dates dates

Okay - I am brand new at this Crystal Reports 8 - VB thing....I am trying to
figure out the formula to make my EXPDATE (expected shipping date) read
(mm/dd/yy) instead of (yy,yym,mdd). Any suggestions would be much
appreciated...I've even gotten the big bible (George Peck's _Complete
Reference_) but I'm still stumped.

Thanks!!!



Tue, 10 Feb 2004 03:41:46 GMT  
 Dates dates dates
Deb,

Please explain further.  Is EXPDATE a database field, a paramater, or
something else?

If it's a date field - then just right click, and format it.using the
appropriate option.
If it's a string, you'll need to convert it to a date to use properly.
But I suspect it's a number in the form yyyymmdd - which is useless for any
date calculations.  The number format is putting a comma in where it breaks
into millions and thousands. You need to convert it to a date value.

Try this in your formula:
local numbervar dn := EXPDATE; // or whatever to get the original number
local numbervar y:=truncate(dn /10000,0);
local numbervar m:=truncate(remainder(dn,10000) /100,0)
local numbervar d:=remainder(dn,100);
Date(y,m,d);

Be interested to see who has other suggestions about how to do this.

Good luck

Bruce


Quote:
> Okay - I am brand new at this Crystal Reports 8 - VB thing....I am trying
to
> figure out the formula to make my EXPDATE (expected shipping date) read
> (mm/dd/yy) instead of (yy,yym,mdd). Any suggestions would be much
> appreciated...I've even gotten the big bible (George Peck's _Complete
> Reference_) but I'm still stumped.

> Thanks!!!



Tue, 10 Feb 2004 09:42:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Date - date = date

2. Compare date in form with date/time in form with date/time in database

3. Dates, Dates, & More Dates

4. Date Difference to Return the most Current Date

5. Date/Time to date

6. VBA date query - not getting current date

7. Changing a Calculate field (Date) depending on Current date

8. ACC97:Date Conversion - Date to Double

9. Extracting the date out of a Date/Time field

10. Those Wierd Dates - Julian Dates

11. Converting Julian Date to Long Date

12. Date part of Date/Time Field

 

 
Powered by phpBB® Forum Software