-
Date & Time
I am returning the system date and time with NOW function and displaying it
in a text box. The user then saves the data to an Access 2000 database.
The field the date is being saved is a general date field. When the user
displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
24 hour time format. I am populating my MSHFlexGrid by DESC order on the
Date field with a recordset. Is there any way to format the Date field in
the SQL statement when returning the recordset? Or am I going in the wrong
direction?
Thanks
RE
-
Re: Date & Time
You can use the format function in your Access statement. For example, instead
of using
SELECT Now()
you can use
SELECT Format(Now(), "yyyy-dd-mm")
or whatever other formating string will make it look the way you want. I
don't have much experience with the FlexGrid but the formating should carry
over to there.
"Randy" <reverett@naeci.com> wrote:
>
>I am returning the system date and time with NOW function and displaying
it
>in a text box. The user then saves the data to an Access 2000 database.
>The field the date is being saved is a general date field. When the user
>displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
>24 hour time format. I am populating my MSHFlexGrid by DESC order on the
>Date field with a recordset. Is there any way to format the Date field
in
>the SQL statement when returning the recordset? Or am I going in the wrong
>direction?
>
>Thanks
>
>RE
-
Re: Date & Time
On 17 Apr 2001 08:17:24 -0700, "Randy" <reverett@naeci.com> wrote:
¤
¤ I am returning the system date and time with NOW function and displaying it
¤ in a text box. The user then saves the data to an Access 2000 database.
¤ The field the date is being saved is a general date field. When the user
¤ displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
¤ 24 hour time format. I am populating my MSHFlexGrid by DESC order on the
¤ Date field with a recordset. Is there any way to format the Date field in
¤ the SQL statement when returning the recordset? Or am I going in the wrong
¤ direction?
¤
¤ Thanks
¤
¤ RE
Have you tried using the Format function in your SQL statement?
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
-
Re: Date & Time
Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
>On 17 Apr 2001 08:17:24 -0700, "Randy" <reverett@naeci.com> wrote:
>
>¤
>¤ I am returning the system date and time with NOW function and displaying
it
>¤ in a text box. The user then saves the data to an Access 2000 database.
>¤ The field the date is being saved is a general date field. When the user
>¤ displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
>¤ 24 hour time format. I am populating my MSHFlexGrid by DESC order on
the
>¤ Date field with a recordset. Is there any way to format the Date field
in
>¤ the SQL statement when returning the recordset? Or am I going in the
wrong
>¤ direction?
>¤
>¤ Thanks
>¤
>¤ RE
>
>Have you tried using the Format function in your SQL statement?
>
>
>Paul ~~~ pclement@ameritech.net
>Microsoft MVP (Visual Basic)
Yes, but I may not be getting the syntax right. The following is the code
where I am returning the recordset that I am sending to the MSHFlexGrid.
How would I use the format option in this SQL statement?
RE
-
Re: Date & Time
"Randy" <reverett@naeci.com> wrote:
>
>Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
>>On 17 Apr 2001 08:17:24 -0700, "Randy" <reverett@naeci.com> wrote:
>>
>>¤
>>¤ I am returning the system date and time with NOW function and displaying
>it
>>¤ in a text box. The user then saves the data to an Access 2000 database.
>>¤ The field the date is being saved is a general date field. When the
user
>>¤ displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
>>¤ 24 hour time format. I am populating my MSHFlexGrid by DESC order on
>the
>>¤ Date field with a recordset. Is there any way to format the Date field
>in
>>¤ the SQL statement when returning the recordset? Or am I going in the
>wrong
>>¤ direction?
>>¤
>>¤ Thanks
>>¤
>>¤ RE
>>
>>Have you tried using the Format function in your SQL statement?
>>
>>
>>Paul ~~~ pclement@ameritech.net
>>Microsoft MVP (Visual Basic)
>
>Yes, but I may not be getting the syntax right. The following is the code
>where I am returning the recordset that I am sending to the MSHFlexGrid.
> How would I use the format option in this SQL statement?
>
>RE
I guess it would help if I included the SQL Statement.
rstSerialNum.Open ("Select Day, Reading, UserName, ComputerName," & _
"Location, TruckNumber, MapNumber From Inventory Where SerialNum like
" & _
strSerialNum1 & " ORDER BY Day DESC"), _
cnnInventory, adOpenStatic, adLockOptimistic, adCmdText
-
Re: Date & Time
SELECT Format(Day, "mm/dd/yyyy"), x, y, z FROM...
"Randy" <reverett@naeci.com> wrote in message
news:3adc7e41$1@news.devx.com...
>
> "Randy" <reverett@naeci.com> wrote:
> >
> >Paul Clement <UseAdddressAtEndofMessage@swspectrum.com> wrote:
> >>On 17 Apr 2001 08:17:24 -0700, "Randy" <reverett@naeci.com> wrote:
> >>
> >>¤
> >>¤ I am returning the system date and time with NOW function and
displaying
> >it
> >>¤ in a text box. The user then saves the data to an Access 2000
database.
> >>¤ The field the date is being saved is a general date field. When the
> user
> >>¤ displays that same record in a MSHFlexGrid the date shows up in
yyyy-dd-mm
> >>¤ 24 hour time format. I am populating my MSHFlexGrid by DESC order on
> >the
> >>¤ Date field with a recordset. Is there any way to format the Date
field
> >in
> >>¤ the SQL statement when returning the recordset? Or am I going in the
> >wrong
> >>¤ direction?
> >>¤
> >>¤ Thanks
> >>¤
> >>¤ RE
> >>
> >>Have you tried using the Format function in your SQL statement?
> >>
> >>
> >>Paul ~~~ pclement@ameritech.net
> >>Microsoft MVP (Visual Basic)
> >
> >Yes, but I may not be getting the syntax right. The following is the
code
> >where I am returning the recordset that I am sending to the MSHFlexGrid.
> > How would I use the format option in this SQL statement?
> >
> >RE
> I guess it would help if I included the SQL Statement.
>
> rstSerialNum.Open ("Select Day, Reading, UserName, ComputerName," & _
> "Location, TruckNumber, MapNumber From Inventory Where SerialNum like
> " & _
> strSerialNum1 & " ORDER BY Day DESC"), _
> cnnInventory, adOpenStatic, adLockOptimistic, adCmdText
-
Re: Date & Time
"Randy" <reverett@naeci.com> wrote:
>
>I am returning the system date and time with NOW function and displaying
it
>in a text box. The user then saves the data to an Access 2000 database.
>The field the date is being saved is a general date field. When the user
>displays that same record in a MSHFlexGrid the date shows up in yyyy-dd-mm
>24 hour time format. I am populating my MSHFlexGrid by DESC order on the
>Date field with a recordset. Is there any way to format the Date field
in
>the SQL statement when returning the recordset? Or am I going in the wrong
>direction?
>
>Thanks
>
>RE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|