Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Number Field to a Date

Status
Not open for further replies.

ihda

MIS
Apr 6, 2001
46
US
Crystal 8.5
Oracle 9i database

I want to convert a numeric field containing a date value to a date. Example of the numeric data: 20030912.

I've reviewed multiple knowledge base entries in tek-tips and at Seagate, but I still cannot make any combination of functions work.

Thank you
 
There's a UFL to do this called numbertodate()

Or create a formula (Insert->Field Objects->Right click formula fields and select New):

whileprintingrecords;
stringvar Dt := totext(20030912,0,"");
cdate(mid(Dt,5,2)+"/"+mid(Dt,7,2)+"/"+left(Dt,4))

Replace 20030912 with your field name.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top