date and time in the report (1 Viewer)

lacampeona

Registered User.
Local time
Today, 02:48
Joined
Dec 28, 2015
Messages
392
hello

i have a field which containes data/time format type. general type

when i choose the date lets say 30.12.2015 i got only the date and i want to be displayes also the time.

i want to be displayes like 30.12.2015 15:15:15

i dont know why is not working...

maybe somebody know what i have to do?

thank you
 

sneuberg

AWF VIP
Local time
Yesterday, 17:48
Joined
Oct 17, 2014
Messages
3,506
I just tried putting a date/time field in a table and then I added a text box bound to that field. I also made the default value of the field the Now() function. It displays the date and time the way you want and I didn't have to do anything special with the text box. So the question is, how are you assigned a time value to the field? If you are only assigning a date then it doesn't show the time.
 

lacampeona

Registered User.
Local time
Today, 02:48
Joined
Dec 28, 2015
Messages
392
hello

i have a table with date field. in that field i put the date/time format general.

when i enter the date i just see the date. i also want to have the time.

i dont know what i make wrong?

thank you
 

lacampeona

Registered User.
Local time
Today, 02:48
Joined
Dec 28, 2015
Messages
392
helooo

yesss i resolved... i dindt have the deafault way thank you

now is working..
thank you

you save me again.

thank you very much
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:48
Joined
May 7, 2009
Messages
19,231
you might also want to look at elegant date:
Code:
Public Function fnElegantDate(Optional ByVal dte As Variant) As String

    Dim dtDate As Date
    Dim lngDay As Long
    Dim strRetVal As String
    
    If IsMissing(dte) Then dte = Date
    dtDate = CDate(dte)
    lngDay = Day(dtDate)
    Select Case lngDay
        Case 1, 21, 31
            strRetVal = "st"
        Case 2, 22
            strRetVal = "nd"
        Case 3, 23
            strRetVal = "rd"
        Case Else
            strRetVal = "th"
    End Select
    strRetVal = Format(dtDate, "dddd") & ", " & _
            Day(dtDate) & strRetVal & " of " & _
            Format(dtDate, "mmmm") & " " & Year(dtDate)
    fnElegantDate = strRetVal
End Function

from your report date label:

label0.Caption = fnElegantDate & " " & Time()
 

Users who are viewing this thread

Top Bottom