nighttrain's Profile User Rating: -----

Reputation: 6 Worker
Active Members
Active Posts:
328 (0.23 per day)
22-September 10
Profile Views:
Last Active:
User is online 18 minutes ago
Viewing Topic: How to determinate type of objec...

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Dream Kudos:
Icon   nighttrain still drilling

Posts I've Made

  1. In Topic: Convert from datetime to unix time

    Posted 2 Sep 2014

    I will take care how is on production when my code will be working and i align string format to it. Anyway am i right with previous post that converting to cut miliseconds will not raise diffrent time i mean here this midnight example.
  2. In Topic: Convert from datetime to unix time

    Posted 2 Sep 2014

    In my particural situation If i want pass through 00:00:00 for specific day and 00:00:00 for next day midnights i can just use my method and it will be working. Miliseconds diffrence will not do any bad.

  3. In Topic: Convert from datetime to unix time

    Posted 2 Sep 2014

    Guys i've found out that using baavgai TestUnix script for two diffrent timestamps i am retreiving same datetime:
    1300123800000 = 14.03.2011 5:30:00 PM
    1300123800440 = 14.03.2011 5:30:00 PM //without 440 ms

    looks like i am loosing last miliseconds, becaue date 14.03.2011 5:30:00 PM is not showing miliseconds right?
    If yes this is reason why for two difffrent timestamps i got same date showing in C# datetime.

    So if i would like to pass two dates to timestamp unix and send out to unix (i want to just take data for all day):
    >= 14.03.2011 00:00:00
    < 15.03.2011 00:00:00

    I can just easly do like this and will be ok am i right?
    ConvertDateTimeTo("14.03.2011 00:00:00 AM");
                ConvertDateTimeTo("15.03.2011 00:00:00 AM");

     public static long ConvertDateTimeTo(string mydate)
                const double LongAdj = 1000.0;
                DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
                DateTime date = Convert.ToDateTime(mydate);
                return (long)((date - UnixEpoch).TotalSeconds * LongAdj);  //public static long FromDateTime(DateTime date) { return (long)((date - UnixEpoch).TotalSeconds * LongAdj); } 
  4. In Topic: Convert from datetime to unix time

    Posted 1 Sep 2014

    but how can i input AM/PM inside my:
    DateTime dt2 = new DateTime(2011, 03, 14, 5, 30, 0, 0, DateTimeKind.Utc);

    I can't find any information about that. Only in this way which i dont want:
    string b = "12/5/2010 12:05:00 PM";
          DateTime aDate = Convert.ToDateTime(a);
  5. In Topic: Pass data from one window to another or to a user control

    Posted 1 Sep 2014

    If it helped you please vote up my answe (green plus). Please precise your second question cante get it.

My Information

Member Title:
D.I.C Regular
Age Unknown
Birthday Unknown
Full Name:
Years Programming:
Programming Languages:
VB,NET, C++, C#, PHP, HTML, JS, CSS, Pascal,

Contact Information

Click here to e-mail me
ICQ  637172526



Page 1 of 1
  1. Photo

    FlashM Icon

    24 Sep 2010 - 14:17
    no problem... you're welcome anytime...
Page 1 of 1