A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Question



 
 
Thread Tools Display Modes
  #11  
Old September 10th, 2009, 05:22 AM posted to microsoft.public.access.tablesdbdesign
paduanow
external usenet poster
 
Posts: 20
Default Date Question

Where do I put the Format command?
--
pad


"paduanow" wrote:

I need to store todays date in a table with the following format:

yyyy,mm,dd

Example: 20090914 (09/14/2009 I need this lead zeros, my store 8
digits/char)

Default will always be todays date. Should the field be a date/time field
or a text field with a string conversion routine that puts it on the required
format?

I will never display this date in a form or report.


--
pad

  #12  
Old September 10th, 2009, 07:18 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date Question

On Wed, 9 Sep 2009 21:22:03 -0700, paduanow wrote:

Where do I put the Format command?


I'd use the Format *function* - not command - in whatever query you use to
export the data to the state's formatted file: you can just put

ExpDate: Format([datefield], "yyyymmdd")

in a vacant Field cell in the query, and then export this query.

Don't confuse data STORAGE with data PRESENTATION. They are different tasks!
--

John W. Vinson [MVP]
  #13  
Old September 10th, 2009, 07:18 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date Question

On Wed, 9 Sep 2009 21:22:03 -0700, paduanow wrote:

Where do I put the Format command?


I'd use the Format *function* - not command - in whatever query you use to
export the data to the state's formatted file: you can just put

ExpDate: Format([datefield], "yyyymmdd")

in a vacant Field cell in the query, and then export this query.

Don't confuse data STORAGE with data PRESENTATION. They are different tasks!
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.