Tuesday, August 30, 2016

Verifying Data For Text Files from vendors

So, I'm gathering feeds from a vendor. It's turning into be a pain in the ass. Here is what I gathered to make it easier the next time. I tried on numerous occasions to send documents with Data specifications. What I found out was they were not reading the specifications. And were just relying on me to review the data that was coming to us. So then I started to debug based on what data was sent. This initial process of course was more time-consuming on my part. But once I figured out what they were doing it's went faster. The good thing is that all the data specifications created can use internally on my end.

  1. Find out all of the fields available.
  2. Determine the initial set of fields needed.
  3. Have them start sending the feeds.
  4. Evaluate the file sense. Considering this set of feeds has headers I copied the header and example data.
  5. I took that header and example data and showed them a before and after of what the data should look like.
  6. Continue steps four and five until this is complete.

Friday, August 26, 2016

Excel The Formula is showing instead of the value

Format the cell to "General" then hit F2. The issue is that somewhere it was changed to text.

TF84013: you cannot modify a field that is read-only or a work item that restricts updates to valid users based on current conditions

Ran into this. Spreadsheet was still connected to  TFS. I ended up just copying the contents of the spreadsheet into brand-new Excel spreadsheet.

How do I combine text in excel sheet to create a sql statement or combine first and last name?

There are two ways to do this... you can use the shortcut or the more formal way:

  • shortcut: =("beginning" & "before column value" & B2 & "after column value and end")
  • formal: =Concatenate("beginning" & "before column value" & B2 & "after column value and end")

  1. Choose the cell where you want to combine the values.
  2. Type in:
    1.  =( 
    2. or 
    3. =Concatenate(
  3. Type in the starting text surrounded by quotes "me" or choose a cell that contains the first text you want to combine like first name.
  4. Type &” “& (a space enclosed in quotation marks).
  5. Type in the next set of text surrounded by quotes "me" or click the next cell with the text that you want to combine like last name.
One other thing I ended up using was the Substitute command as well. It allowed me to replace semicolons with commas for comma delimited exports.

Thursday, August 25, 2016

How to remove the date and author of a post in the Affinity Theme

Ok, this one took me a while...


  1. Log in as Admin to the WordPress site
  2. Navigate to Appearance | Editor
  3. Click on template-tags.php in the right hand navigation with all of the pages.
  4. Search for the following line:
    1. echo '' . $posted_on . ''; // WPCS: XSS OK
  5. If you don't want the date and the author to show, change this line to the following:
    1. //echo '' . $posted_on . ''; // WPCS: XSS OK
  6. If you don't want to only show the date, change this line to the following:
    1. echo '' . $posted_on . ''; // WPCS: XSS OK
  7. If you don't want only show the author, change this line to the following:
    1. echo ''; // WPCS: XSS OK

C# moving a file from one directory to another

C# moving a file from one directory to another


var fileName = @"xyz.txt";
var fromPath = @"c:\test\";
var toPath = @"c:\test\complete\";



public static void MoveFileToDirectory(string moveFile)
        {
            string fileOrigin = fromPath + moveFile;
            string fileDestination = toPath + moveFile;
            File.Move(fileOrigin, fileDestination);

        }

MoveFileToDirectory(fileName);

C# convert string YYYYMMDD string to datetime

Use DateTime.TryParseExact.
var newDate = DateTime.ParseExact("20160823", "yyyyMMdd", CultureInfo.InvariantCulture);

Add if not already referenced
using System.Globalization;