Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Carlito Santiago
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 0
    • Groups 0

    Carlito Santiago

    @Carlito Santiago

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Carlito Santiago Follow

    Latest posts made by Carlito Santiago

    • RE: Get uniquevisitors per month from database.

      Correct me if I'm wrong. I'm really not sure if what you're trying to do. Are you trying to create a unique visitor graph or are you simply trying to display the unique Visitors for that current month? However, I think MongoDB timestamp is much similar to javascript time stamp. MongoDB has some built-in command to convert it however you can just as easily do this with javaScript.

      var objectIdFromDate = function (date) {
      	return Math.floor(date.getTime() / 1000).toString(16) + "0000000000000000";
      };
      
      var dateFromObjectId = function (objectId) {
      	return new Date(parseInt(objectId.substring(0, 8), 16) * 1000);
      };
      	
      
      posted in General Discussion
      Carlito Santiago
      Carlito Santiago