How to get the Current Date & Time Automatically to a Date Time Field










1















I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.



I dont want to give the user to select a Date Time instead it should populated automatically



Is there anyway to achieve this without writing code in code behind files?










share|improve this question




























    1















    I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.



    I dont want to give the user to select a Date Time instead it should populated automatically



    Is there anyway to achieve this without writing code in code behind files?










    share|improve this question


























      1












      1








      1


      2






      I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.



      I dont want to give the user to select a Date Time instead it should populated automatically



      Is there anyway to achieve this without writing code in code behind files?










      share|improve this question
















      I have created a date time field I made today's date as the default value, Then I added it to a page layout and created a page, But the current Date Time is not picking up from the system.



      I dont want to give the user to select a Date Time instead it should populated automatically



      Is there anyway to achieve this without writing code in code behind files?







      sharepoint datetime






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 30 '16 at 2:04









      Mike

      1,4932819




      1,4932819










      asked May 10 '10 at 7:43









      MudithMudith

      6112




      6112






















          3 Answers
          3






          active

          oldest

          votes


















          0














          This is very similar to this question I think



          • SO - How to get Date and current time from the Date/Time column in SharePoint Custom list

          My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.






          share|improve this answer
































            0














            Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.



            Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same






            share|improve this answer























            • The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

              – Ryan
              May 11 '10 at 11:48


















            -1














            Does [Today] work?



            If you have language pack applied to SharePoint, then you must use localized "Today" string.






            share|improve this answer























            • Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

              – Mudith
              May 10 '10 at 8:44











            • You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

              – Ryan
              May 10 '10 at 9:10











            • Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

              – Janis Veinbergs
              May 10 '10 at 9:52






            • 2





              If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

              – Ryan
              May 11 '10 at 11:47











            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f2801062%2fhow-to-get-the-current-date-time-automatically-to-a-date-time-field%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is very similar to this question I think



            • SO - How to get Date and current time from the Date/Time column in SharePoint Custom list

            My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.






            share|improve this answer





























              0














              This is very similar to this question I think



              • SO - How to get Date and current time from the Date/Time column in SharePoint Custom list

              My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.






              share|improve this answer



























                0












                0








                0







                This is very similar to this question I think



                • SO - How to get Date and current time from the Date/Time column in SharePoint Custom list

                My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.






                share|improve this answer















                This is very similar to this question I think



                • SO - How to get Date and current time from the Date/Time column in SharePoint Custom list

                My answer there gives a few options such as using the built in Created field, using a calendar template, a JavaScript hack and a custom field type.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 23 '17 at 12:10









                Community

                11




                11










                answered May 10 '10 at 9:15









                RyanRyan

                16.5k2275117




                16.5k2275117























                    0














                    Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.



                    Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same






                    share|improve this answer























                    • The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:48















                    0














                    Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.



                    Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same






                    share|improve this answer























                    • The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:48













                    0












                    0








                    0







                    Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.



                    Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same






                    share|improve this answer













                    Guys, fake [Today] trick worked for us - but prob is we only got the date value not datetime.



                    Janis, is it possible to get date and time both from the fake [today] column trick? pls refer few articles on the same







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 10 '10 at 14:16









                    MudithMudith

                    1




                    1












                    • The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:48

















                    • The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:48
















                    The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                    – Ryan
                    May 11 '10 at 11:48





                    The fake today trick does not work reliably and even if it did its not going to give you date & time. * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                    – Ryan
                    May 11 '10 at 11:48











                    -1














                    Does [Today] work?



                    If you have language pack applied to SharePoint, then you must use localized "Today" string.






                    share|improve this answer























                    • Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                      – Mudith
                      May 10 '10 at 8:44











                    • You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                      – Ryan
                      May 10 '10 at 9:10











                    • Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                      – Janis Veinbergs
                      May 10 '10 at 9:52






                    • 2





                      If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:47















                    -1














                    Does [Today] work?



                    If you have language pack applied to SharePoint, then you must use localized "Today" string.






                    share|improve this answer























                    • Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                      – Mudith
                      May 10 '10 at 8:44











                    • You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                      – Ryan
                      May 10 '10 at 9:10











                    • Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                      – Janis Veinbergs
                      May 10 '10 at 9:52






                    • 2





                      If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:47













                    -1












                    -1








                    -1







                    Does [Today] work?



                    If you have language pack applied to SharePoint, then you must use localized "Today" string.






                    share|improve this answer













                    Does [Today] work?



                    If you have language pack applied to SharePoint, then you must use localized "Today" string.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 10 '10 at 8:08









                    Janis VeinbergsJanis Veinbergs

                    5,66543868




                    5,66543868












                    • Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                      – Mudith
                      May 10 '10 at 8:44











                    • You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                      – Ryan
                      May 10 '10 at 9:10











                    • Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                      – Janis Veinbergs
                      May 10 '10 at 9:52






                    • 2





                      If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:47

















                    • Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                      – Mudith
                      May 10 '10 at 8:44











                    • You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                      – Ryan
                      May 10 '10 at 9:10











                    • Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                      – Janis Veinbergs
                      May 10 '10 at 9:52






                    • 2





                      If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                      – Ryan
                      May 11 '10 at 11:47
















                    Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                    – Mudith
                    May 10 '10 at 8:44





                    Hi Janis, when we use Today - it gives following error "Calculated columns cannot contain volatile functions like Today and Me." It seems today cannot be used as a calculated column function. What we think is having a DATETIME field which will populate the current datetime only which needs to be coming from the system wihtout any coding. Is this possible? After this we can created a calculated text column to show the date time in a format we desire. But we stuck at the first problem. Thanks

                    – Mudith
                    May 10 '10 at 8:44













                    You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                    – Ryan
                    May 10 '10 at 9:10





                    You can't use TODAY in calculated columns - and the oft repeated fake column trick doesn't work. blog.pentalogic.net/2008/11/…

                    – Ryan
                    May 10 '10 at 9:10













                    Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                    – Janis Veinbergs
                    May 10 '10 at 9:52





                    Without even the fake column trick? How can it doesn't work? It must work: abstractspaces.wordpress.com/2008/05/19/…

                    – Janis Veinbergs
                    May 10 '10 at 9:52




                    2




                    2





                    If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                    – Ryan
                    May 11 '10 at 11:47





                    If you read the comments in this or any other article mentioning the trick you will see "It works great, Thanks!" then a few days later "Oh - its not working any more". Try it for yourself (but make sure you check again tomorrow). More details on why it doesn't work * stackoverflow.com/questions/878744/… * blog.pentalogic.net/2008/11/… * blog.pathtosharepoint.com/2008/08/14/…

                    – Ryan
                    May 11 '10 at 11:47

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f2801062%2fhow-to-get-the-current-date-time-automatically-to-a-date-time-field%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Use pre created SQLite database for Android project in kotlin

                    Darth Vader #20

                    Ondo