Thursday, August 14, 2008

Converting a byte[] to DateTime.value

Hi all this a Conversion problem I found when trying to Get all Event Entry From window Event Log because it retrieve the value with byte[] Date
I found the solution in Encoding.GetString and the parse it to DateTime Value
Example :
string strdate = "02/01/2007";
byte[] date = System.Text.Encoding.ASCII.GetBytes(strdate);
string strtime = "12:01:59";
byte[] time = System.Text.Encoding.ASCII.GetBytes(strtime);
string strTemp = System.Text.Encoding.Unicode.GetString(date);
DateTime dt = DateTime.Parse(System.Text.Encoding.ASCII.GetString(date)+" "+System.Text.Encoding.ASCII.GetString(time));

Hope this helps you in clearing problem.Feel free

Using “If” In CSS: Conditional-CSS

Using different CSS properties for different browsers is very common as they are not rendered the same.

Conditional-CSS allows you to use "if statements" for targeting specific browser versions or a group of browsers.

conditional-css

Features of Conditional-CSS:
  • Target CSS to any web-browser
  • Streamline maintenance of your CSS files
  • Optimize your CSS
  • Work around those annoying little CSS bugs
  • Automatic expansion and inclusion of @import statements
  • It’s free and open source!

Website has an online compiler that enables you to generate the Conditional-CSS file in PHP, C or C#.