Ask Your Question
0

Insert a date from date field into a cell

asked 2015-07-28 07:57:54 +0100

Kioturt12 gravatar image

updated 2015-07-28 18:26:54 +0100

Hi,

I have seen this wiki. What I'd like to do is to insert the value of the date field from calender into a cell, so a user can choose any date and it will be automatically inserted into a cell.

Is it possible to do that?

Thanks

EDIT: here is my Date Field : http://imageshack.com/a/img661/9278/N...

it's in italian but you can see that I have only General and Events tabs.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2015-07-28 19:14:04 +0100

m.a.riosv gravatar image

One basic as list can be created with Menu/Data/Validity.

From today in this sample the selection begins 7 days before up to two years after.

In this case done for English USA, it's important format properly "DDD MM/DD/YYYY" for your language to get it recognized as date by the selection.

DDD = the first three letters of week day. DD = day in month. MM = month. YYYY = year, four digits.

The finel format in the cell is the cell format not the selection format.

image description

edit flag offensive delete link more

Comments

HI- my advice is to put the range in a sheet =TODAY()-7+ROW(A1:A740) and format as date (optionally hidden). So you can just use the address of this range (e.g. C1:C740) as validity source. The advantage is that the selection in the list is a date and not a text.

Regards

pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-07-28 19:34:49 +0100 )edit

@pierre-yves samyn: the Choice from the Textlist is handled as User-Input and so directly convertet into Date. but in case you need such Date-Validity more than once, its an advantage to use a real Cellrange.

karolus gravatar imagekarolus ( 2015-07-28 19:51:57 +0100 )edit
1

answered 2015-07-28 11:09:55 +0100

pierre-yves samyn gravatar image

updated 2015-07-28 15:37:13 +0100

Hi

This is possible by macro as explained in this wiki page. It is in French, but it includes a sample spreadsheet that you might inspire you.

[EDIT] Steps:

  • Create the macro (copied from the wiki)
  • Specify the target cell in the Data Fieldof the Control's Data tab
  • Select the macro by clicking the [...] button of Text modified the Events tab:

screenshot

Regards

edit flag offensive delete link more

Comments

ok thanks, I have created the macro but now how can I associate it to the date field?

Kioturt12 gravatar imageKioturt12 ( 2015-07-28 15:19:47 +0100 )edit

@Kioturt12 I edited my answer to include steps and a screenshot

pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-07-28 15:38:54 +0100 )edit

Thanks again, now the problem is that I don't have the Data tab in Data Field Properties. Do you know why?

Kioturt12 gravatar imageKioturt12 ( 2015-07-28 16:18:59 +0100 )edit

It would be easier if you explained how you proceed, rather than guess why you do not have the expected result... Did you draw your control with Form Controls toolbar then More Controls then Date field?

pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-07-28 16:36:14 +0100 )edit

@pierre-yves samyn, yes I did, my Date Field looks exactly like your. I uploaded an image.

Kioturt12 gravatar imageKioturt12 ( 2015-07-28 18:23:33 +0100 )edit

Thank you for the screenshot... Sorry I do not know... What system & Version do you use (I have only tested on windows)?

pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-07-28 19:03:20 +0100 )edit

I have linux mint 17.2 x64

Kioturt12 gravatar imageKioturt12 ( 2015-07-28 20:08:45 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-07-28 07:57:54 +0100

Seen: 1,987 times

Last updated: Jul 28 '15