Sage 100

 View Only
  • 1.  Is there a quick formula in Crystal that will disp

    Posted 09-01-2015 10:02
    Is there a quick formula in Crystal that will display the Time Created field in a readable fashion? Sage saves the Time Created as a string field and the numbers don't necessarily represent hour:minute:second. User wants to display the time a sales order was created. TIA


  • 2.  RE: Is there a quick formula in Crystal that will disp

    Posted 09-01-2015 10:56
    Sage did not do us any favors by making the time a decimal instead of HH:MM below is a formula that I believe will work for you although I have only done the most basic of testing and you may need to add logic to handle a NULL or Non-numeric time to be safe. NumberVar OldTime := tonumber({SO_SalesOrderHeader.TimeCreated}); stringvar NewTime; NumberVar Hours; NumberVar Minutes; //Extract the number of hours Hours := Int(OldTime); //Get the decimal portion for minutes and multiply by 60 to get the actual number of minutes Minutes := Remainder(OldTime, 1) * 60; // Put all of this in HH:MM format that is now essentially military time NewTime := totext(Hours,0)+"":""+totext(minutes,0); //now convert the military time to standard time ctime(newtime)


  • 3.  RE: Is there a quick formula in Crystal that will disp

    Posted 09-01-2015 20:50
    Thank You David. Wow, all that to get the correct time. I don't know why Sage does these things. Anyway, with a little tweaking it worked great. Thanks so much.