Home      Ask a Question      My Stuff      Help   
  
Scripting - Change the order of the Punch Date from YYYY-MM-DD to MM-DD-YYYY
The "punchdate" when referenced is in a "YYYY-MM-DD" fashion. To change this to a a more traditional format like "MM-DD-YYYY" you can create a variable to make the adjustment using the below script:

$newdate = (((mid(punchdate,6,2) + "-") + right(punchdate,2)) + "-") + left(punchdate,4);

This makes $newdate a reorganized version of the punchdate string into the format mentioned "MM-DD-YYYY";

ID
1358
Category
>Support
  Scripting
Date Created
11/7/2014 9:43:52 AM
Date Updated
1/12/2015 7:21:43 AM
Back to Search Results