PC Review


Reply
Thread Tools Rate Thread

Date Format Code

 
 
rml
Guest
Posts: n/a
 
      7th Jun 2009
How can I make the following code convert the date portion to dd/mm/yy
instead of the standard mm/dd/yy?

= Trim([CreateDate] & " / " & [Tech])

Thanks.
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      7th Jun 2009
rml wrote:

>How can I make the following code convert the date portion to dd/mm/yy
>instead of the standard mm/dd/yy?
>
>= Trim([CreateDate] & " / " & [Tech])



This is different from your other formatting question.
Here, you need to use the Format function:

=Trim(Format(CreateDate, "ss/mm/yy") & " / " & [Tech])

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      7th Jun 2009
"Marshall Barton" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> rml wrote:
>
>>How can I make the following code convert the date portion to dd/mm/yy
>>instead of the standard mm/dd/yy?
>>
>>= Trim([CreateDate] & " / " & [Tech])

>
>
> This is different from your other formatting question.
> Here, you need to use the Format function:
>
> =Trim(Format(CreateDate, "ss/mm/yy") & " / " & [Tech])


Slight typo. It should be

=Trim(Format(CreateDate, "dd/mm/yy") & " / " & [Tech])


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Microsoft Excel Worksheet Functions 6 2nd Jun 2009 08:14 PM
Code Date Format Depending on Computer format =?Utf-8?B?TXlyaWFt?= Microsoft Excel Misc 0 17th Jul 2007 03:26 PM
i have two date fileds Opend date Due date, can i set default on due date so, its always = to open date on my data entry form1 Urgent Mike Saifie Microsoft Access Form Coding 1 9th Mar 2006 02:08 AM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier Microsoft Excel Programming 0 22nd Sep 2004 03:26 PM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Microsoft Excel Programming 1 25th Nov 2003 12:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:20 PM.