tDetail.EmployeeSSN = Format("" & !EmployeeSocialSecurity, "000000000")
I did it this way and showed it to the lead programmer and he said to research it and do it another way.
VB.NET
tDetail.EmployeeSSN = string.Format("" + item["EmployeeSocialSecurity"].ToString(), "000000000");
I am relatively new to C# and some .NET. I researched this and I do not know what he means!
Thanks ahead of time,
aar
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 3, 2011, 6:08 AM EDT
A RepaskyRank #8,108 · 228 reputationPosted Jun 3, 2011, 6:31 AM EDT
tDetail.EmployeeSSN = item["EmployeeSocialSecurity"].ToString().PadLeft(9, '0'); This is what he wanted me to do. Sorry to bother you on this. aarDorababu MekaRank #457 · 5.5K reputationPosted Jun 3, 2011, 6:33 AM EDT
VulpesRank #55 · 29.2K reputationPosted Jun 3, 2011, 7:11 AM EDT
However, for something like a SSN, I'd have thought you would want leading zeros to be displayed.
EDIT
For some unknown reason the last two posts weren't showing before I posted!
Sam HobbsRank #107 · 20.5K reputationPosted Jun 3, 2011, 3:00 PM EDT