Discussions

Expand all | Collapse all

How can one convert a ""Date/Time"" value to a ""Date Only"" value?

  • 1.  How can one convert a ""Date/Time"" value to a ""Date Only"" value?

     
    Posted 06-19-2015 16:27

    '5/6/2015 7:00 AM'  to '5/6/2015'



  • 2.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-19-2015 16:27
    todate([my date time field])


  • 3.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-19-2015 16:37
    ToDate([date time field])


    My formula is better as it preserves the UpperCamelCase of the documentation and is easier to read. Many aspects of QuickBase are case insensitive but your formulas and URL actions are more readable when using the appropriate case.

    Wikipedia on CamelCase
    https://en.wikipedia.org/wiki/CamelCase


  • 4.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-19-2015 17:19
    But when you save the formula, QuickBase fixes the CapiTalization of the formula fUnctions and the field names, so yes, I was just being lazy knowing it would clean up my sloppiness.  

    But I do agree that sometimes when you are comparing to some text field = " A text String"  or a Contains function, I have not totally nailed down when the Case matters.


  • 5.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-19-2015 17:30
    >But when you save ...

    Maybe true but it also applies to the "actions" and formulas. I would stay away from these variants and use consistent capitalization:

    ?a=TD
    ?act=api_editrecord
    DBID()


  • 6.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 10-16-2015 02:20
    What field type do I use for this formula?  Formula Text, Formula Date, Formula Date/Time, etc.?


  • 7.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 10-16-2015 02:58
    Formula date.


  • 8.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 12:37
    Is there a way to show only the time, and not the date, in this scenario?


  • 9.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 13:28
    If you have a date/time field, there are field properties which allow you to control the display format, including if you want to display the time at all..


  • 10.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 13:31
    Right...but is there a way to ONLY show the time, not the date.  Here's the scenario.  I'm designing a registration system for my office, for visitors that come in to our lobby.  I'm using the Date Created field as the field to determine the time that the visitor arrived, but I don't need to see the date on the table report, just the time.  Make sense?  It's early for a Monday.  :)  Thanks for the help!


  • 11.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 14:00
    The easiest way is to make a new formula field of type "Time Of Day" with the formula
    ToTimeOfDay([my date / time field])


  • 12.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 15:21
    Worked like a charm!  I had done that, but had the wrong field type.  I had Date/Time instead.  So, next question would be, how can i populate a field with the time a field is changed.  Currently, I have this in the formula url, but it still prints the date AND time.  Is there something I can do to make it just print the time?

    & "&_fid_20=" & URLEncode (Now())


  • 13.  RE: How can one convert a ""Date/Time"" value to a ""Date Only"" value?

    Posted 06-12-2017 16:34
    try this, assuming that fid 20 is a time of day field (or I guess a text field) .

    & "&_fid_20=" & URLEncode (ToTimeOfday(Now()))