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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need quick help with date formula

Status
Not open for further replies.

jstoehner

Technical User
Oct 20, 2006
18
0
0
US
I need a formula to convert "20070131" coming through the database as a number to date format -- 01/31/2007. I can't change the data type for the field on the database so how can I convert it in my CR? Thanks!
 
Try the following:

Create a formual @DateValue
StringVar No_Date_To_Txt_Date := totext(20070131, "0");
date(val(left(No_Date_To_Txt_Date,4)),val(mid(No_Date_To_Txt_Date,5,2)),val(right(No_Date_To_Txt_Date,2)))

Hope this helps!

Thank you
Keerthana!
 
That should be:

StringVar No_Date_To_Txt_Date := totext({table.number},0,"");

The rest looked right to me.

-LB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top