AnsweredAssumed Answered

Help with Date Custom Formatting

Question asked by thong127 on Jul 7, 2015
Latest reply on Jul 7, 2015 by philmodjunk

Title

Help with Date Custom Formatting

Post

Hi All,

Im having in trouble with date formatting in my labels. I have two tables (Materials & Labels)

Here are the fields of my Data Base (Materials)

 

                                                                                                                                                                             
Field NameType
Material NameText
               

Material Code

               

Material Lot Number

               

Quantity Received

               

Units

               

Location

               

Date Received

               

Quantity Balance

               

Quantity Used

               

No. of Container

               

Expiry Date

               

Retest Date

               

Supplier

               

Manufacturer

               

Manufacturer Lot No.

               

Quantity in each Container

               

Received by

               
               

Text

               

Text
                

               

Number

               

Text

               

Text

               

Date

               

Calculation

               

 

               

NUmber

               

Number

               

Date

               

Date

               

Text

               

Text

               

Text

               

Text

               

Number

               

Text

               

Fields of my Labels Table

 

                                                                 
               

Field Name

               

Label

               

Location

               
               

Type

               

Text

               

Text

               

 Below is the Script that Will Crate a Label ( Thanks to Nous & Raybaudi)

Allow user abort 

Set Error Capture 

Set variable Name [$_Matname ; Value: Materials::Material Name]

Set variable Name [$_Matlot ; Value: Materials::Material Lot Number]

Set variable Name [$_MatCode ; Value: Materials::Material Code]

Set variable Name [$_MatRec ; Value: Materials::Quantity Received]

Set variable Name [$_MatUnit ; Value: Materials::Units]

Set variable Name [$_MatRecby ; Value: Materials::Receivedby]

Set variable Name [$_MatRecdate ; Value: Materials::Date Received]

Set variable Name [$_MatManu ; Value: Materials::Manufacturer]

Set variable Name [$_MatManuLot ; Value: Materials::Manufacturer Lot No.]

Set variable Name [$_MatExp ; Value: Materials::Expiry Date]

Set variable Name [$_MatRet ; Value: Materials::Retest Date]

Set variable Name [$_MatnContainers ; Value: Materials::No. of Container]

Set variable Name [$_MatLoc ; Value: Materials::Location]

Freeze Window

Go to Layout ["Labels"(Labels)]

Show all Records

Delete all Records [No dialog]

Loop

Set Variable[ $X; Value: Get (FoundCount)]

Set Variable[ $_Text; Value: 

"PRODUCT BRIEF DESCRIPTION: "&¶ & $_MatName&¶& 

"MFG LOT#: "&$_MatManuLot&¶ &

"MANUFACTURER: "&$_MatManu&¶& 

"SUPPLIER: "&$_MatSup&¶&

"CODE: "&$_MatCode&¶&

Case(
$_MatRet ; "RETEST DATE: " & $_MatRet ;
"EXPIRY DATE: " & $_MatExp
)
 & ¶ & 

"CONTAINER: "&Get ( RecordNumber ) & " of " & $_MatnContainers&¶ & 

"RECEIVED BY: "&$_MatRecby&¶ & 

"RECEIVED DATE: " &$_MatRecdate & ¶ & 

"TOTAL QTY REC'D: " &$_MatRec & " " & $_MatUnit

]

Set Field [Labels::Label; $_text]

Exit Loop If ($X≥$_MatnContainers

Set variable Name [$_text ; Value: "Location: "&$_MatLoc]

Set Field [Labels:: Location; $_text]

End Loop

Enter Preview Mode []

 

My Problem is How can I format the My Receiving Date in my Label Using this Custom Format (mm dd/yy)

I tried Changing the format in my Materials table but the output is not my desired format.

Thank you so much in advance to any help that you can extend.

 

LoLa

 

 

 

 

Outcomes