Date formatting of date type 
Author Message
 Date formatting of date type

I have a date type that is in a cirtain format, but I
need to force it to be displayed in another format. What
I need to do is convert a date from the following format
('6/05/2003 10:44:35 AM') and turn it into the following
format ('2003-05-06 10:44:04.000')...

Can someone please help on either a quick sample or a
direction on where to look in the documentation.

Thanks Glenn



Sat, 19 Nov 2005 08:18:21 GMT  
 Date formatting of date type


Quote:
> I have a date type that is in a cirtain format, but I
> need to force it to be displayed in another format. What
> I need to do is convert a date from the following format
> ('6/05/2003 10:44:35 AM') and turn it into the following
> format ('2003-05-06 10:44:04.000')...

> Can someone please help on either a quick sample or a
> direction on where to look in the documentation.

Check the FORMAT command : )

--

Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/



Sat, 19 Nov 2005 11:13:44 GMT  
 Date formatting of date type
Glenn,

        '6/05/2003 10:44:35 AM'
        Dim d As Date = #6/5/2003 10:44:35 AM#
        '2003-05-06 10:44:04.000'
        MsgBox(Format(d, "yyyy-dd-MM HH:mm:ss.fff"))
        'If you need the AM/PM
        MsgBox(Format(d, "yyyy-dd-MM HH:mm:ss.fff tt"))

Vince


Quote:
> I have a date type that is in a cirtain format, but I
> need to force it to be displayed in another format. What
> I need to do is convert a date from the following format
> ('6/05/2003 10:44:35 AM') and turn it into the following
> format ('2003-05-06 10:44:04.000')...

> Can someone please help on either a quick sample or a
> direction on where to look in the documentation.

> Thanks Glenn



Sat, 19 Nov 2005 12:15:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MS-ACCESS query date problem + date formatting in datagrid

2. searching a routine to convert date number in normal format date

3. is date() accepts both UK and US date formats

4. convert Full date from minutes to normal date format

5. Output format of date (using ActiveX Windows date time picker)

6. String date to date format?

7. Extracting date formats from a date

8. Extracting date formats from a date

9. Convert date serial to a date data type

10. Type = Date..... checking txt inputs for dates

11. Date Data types jumping formats

12. MSAcess DATE type format change

 

 
Powered by phpBB® Forum Software