Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:56:10+00:00 2026-05-27T05:56:10+00:00

I am calling this function: val(array[i][index]) when i try to pass a time stamp

  • 0

I am calling this function:

val(array[i][index])

when i try to pass a time stamp 123,213,121,212

where:

   function val(m) {

        try {
            if (m == null) return '';
            if (typeof m == 'number') return num(m);
            if (typeof m == 'string') return str(m);
            if (typeof m == 'boolean') return m ? 'true' : 'false';
            return m.length ? arr(m) : obj(m);

        }
        catch (err) {

            return "";

        }


    }
    function num(m) { return m; }
    function str(m) {

        return m.substr(0, 6) == '/Date(' ? dfmt(date(m)) : m;
    }
    function date(s) { return new Date(parseFloat(/Date\(([^)]+)\)/.exec(s)[1])); }
    function pad(d) { return d < 10 ? '0' + d : d; }
    function dfmt(d) { return d.getFullYear() + '/' + pad(d.getMonth() + 1) + '/' + pad(d.getDate()); }

The function failed.

It might be due to a comma.

How can i solve this.

Any help is appreciated

PROBLEM SOLVED:

Actually the value “123.135.414.414” is of Object type

SO i need to write something like:

  function val(m) {

        try {
            if (m == null) return '';
            if (typeof m == 'object') return m;
            if (typeof m == 'number') return num(m);
            if (typeof m == 'string') return str(m);
            if (typeof m == 'boolean') return m ? 'true' : 'false';
            return m.length ? arr(m) : obj(m);

        }
        catch (err) {

            return "Time Stamp";

        }


    }

This solves my problem for this time.

Any further suggestion is welcomed

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:56:10+00:00Added an answer on May 27, 2026 at 5:56 am

    PROBLEM SOLVED:

    Actually the value “123.135.414.414” is of Object type

    SO i need to write something like:

    function val(m) {

        try {
            if (m == null) return '';
            if (typeof m == 'object') return m;
            if (typeof m == 'number') return num(m);
            if (typeof m == 'string') return str(m);
            if (typeof m == 'boolean') return m ? 'true' : 'false';
            return m.length ? arr(m) : obj(m);
    
        }
        catch (err) {
    
            return "Time Stamp";
    
        }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function like this: MyFunction(double matrix[4][4]) {/*do stuff*/} I am calling this
I need this for calling a C function from Java class (JNI) and I
I'm calling a PageMethod in javascript. Like this: function DeleteBatchJS2() {$find('mdlPassword').hide(); var pswd =
I have written this function which will set val=max or min (if val comes
I have the following AJAX call: $('#FonykerUsernameRegister').blur(function(){ if($(this).val().length > 2) { alert($(this).val()); $.ajax({ url:
I'm calling this linear class relationship , but correct me if I'm wrong. I'm
What are the problems that calling this method can help with? Do you ever
alt text http://img179.imageshack.us/img179/7827/textwriter.jpg the tf.txt file has 0 bytes and when calling this method
The browser does this by calling public void emulateShiftHeld() method on the WebView which
so live docs says this for calling .lenght() on an XML object For XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.