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 8533739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:02:20+00:00 2026-06-11T10:02:20+00:00

Im writing a mvc4 application that will be used globally. Part of the application

  • 0

Im writing a mvc4 application that will be used globally. Part of the application is recording when a transaction was added or modified.

So I am saving the transaction datetime as UTC. from the clientside whats my best way to display the date as they are expecting?

Is this a javascript function I should be using or should I be doing something within the view?

  • 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-06-11T10:02:21+00:00Added an answer on June 11, 2026 at 10:02 am

    Internally, javascript date objects store the time as a number of milliseconds since an epoch UTC (1970-01-01T00:00:00Z). The simplest way to transfer time is using that number, so:

    // 2012-09-16T10:30:00.000Z
    var ms = 1347791400000;
    
    // Create a new date object using UTC milliseconds
    var d = new Date(ms);
    
    alert(d); // Shows local time equivalent, e.g. 2012-09-16T20:30:00GMT+1000
    

    Alternatively, you can pass a UTC timestamp, split it into its components and convert it to a date object using Date.UTC. Note that months are zero based so one must be subtracted from the calendar month number.

    To get the UTC millisecond value for a local time, use Date.prototype.getTime. For the example above:

    alert(d.getTime()); // 1347791400000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Writing an application in Cocoa that will take input from the user, format it
I have been writing an application using ASP.Net MVC4, where the majority of the
Writing a client application that sends images to a server via a webservice. As
Writing an app that will include the ability to decompress zip and rar files.
Writing a simple program that will find exact duplicate files on my computer, but
I'm writing up a set of unit-tests for my MVC4 application. I want to
I am writing a Web API using MVC4 that should be consumed by multiple
I have just recently begun writing an application in ASP.NET MVC4. My application has
I am currently writing unit tests for my repository implementation in an MVC4 application.
Writing my first silverlight application. I need to deliver some bitmap that the customer

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.