Google Sheet-Date validation in specific format - google-sheets

how to use specific date formats in data validation in Google Sheets.
I set this date format in google sheet dd-mmm-yyyy (09-Jan-2023) but the user enters a different date format in the sheet so im want to use data validation for this the user must enter data in specific format dd-mmm-yyyy
i want that when user enter data in different format its auto rejects entry.

try:
=REGEXMATCH(A1&""; "\d{2}-.{3}-\d{4}")
or:
=REGEXMATCH(A1; "\d{2}-.[A-z]{3}-\d{4}")

If you previously set the date format in the range you want, then no matter in which way the date is inserted then it will be displayed as you wish. Specially with mmm format you'll be always at risk that they can mess with how the month is supposed to be written, I think it's preferably for them to insert the number and you choose how it is displayed

Related

How to i change the date time format on Google Sheets?

I am working on a datasheet on Google sheets and I am trying to change values in column (D) to date time format, so I went to Format<number<date time. But only a few values are getting converted and the rest remain the same. Please see below-
Screenshot of column D
The values aligned on right are converted and the left ones aren't. I even tried paint format, trim white spaces but it didnt work. Please suggest a way on how to resolve this error. Also, there are 49623 values in column D.
thank you
Your spreadsheet is set to a locale that uses the mm/dd/yyyy date format, while your data is using the dd/mm/yyyy date format. That means that the dates where the day of the month is less than or equal to 12 will get converted to dates incorrectly, and the rest of the data will remain as text strings.
To make it work, choose File > Settings > Locale and choose a locale that matches your data, then repaste the data to convert it correctly.
The "49623 values" are dateserials that can be converted to dates by formatting them in a date format. See this answer for an explanation of how date and time values work in spreadsheets.

Google Sheets: NOW Formula Populating Numeric Value Only

I'm trying to add a NOW statement in my IF formula. Its working but populating numeric values only, see formula below:
=IF(D3="","",NOW())&"-Login Details and Tablet have been sent to partner"
Result: 44005.4947026389-Login Details and Tablet have been sent to partner
The number you're getting refers to the quantity of days passed since December 30, 1899. When you concatenate this date with other content, the cell is not being interpreted as a date, so the date is not getting formatted according to your preferences.
To format this date, you could use TEXT (check the Notes to see the possible formatting options for this). See, for example, this:
=IF(D3="","",TEXT(NOW(),"yyyy-mm-dd_hh:mm:ss"))&"-Login Details and Tablet have been sent to partner"
Reference:
TEXT

Is it possible to have a variable within a hyperlink in MSWord?

I want to have
http://reports.ieso.ca/public/DispUnconsHOEP/PUB_DispUnconsHOEP_date_v24.xml
in Microsoft Word, but want the date to be a variable. When clicked I want it to be filled in with yesterday's date in the format of YYYYMMDD.
An example would be
http://reports.ieso.ca/public/DispUnconsHOEP/PUB_DispUnconsHOEP_20160707_v24
but want the date to change depending on the current date

How to add an HH:MM time value to an Access database?

I want to add time only as HH:MM to MS Access in Delphi.
It is shown as '21:21:00' in the Access table but it shows up as '30.12.1899 21:21:00' in my dbgrid.
ADOTable1.Active:=FALSE;
ADOTAble1.Open;
ADOTable1.Insert;
ADOTable1time.Value:=Strtotime(MaskEdit1.Text);
ADOTable1.post;
ADOTable1.Active:=TRUE;
Note: I changed editmask option to short time of TMaskEdit1
Thank in advance.
The data is correctly stored, it's just not displayed as you would like.
The Date/Time in Access as the Delphi TDateTime is storing casually spoken
the date in the integer part and the time in the fractional part.
To get the Time shown as desired just set the DisplayFormat property of your field to hh:nn:ss.
In the pictures below you can see the always same field formatted, not formatted and as float.
You need to tweak the formatting for that column of your dbgrid to only show the time component. Access only has a Date/Time column type (it does not have separate Date and Time column types) so a Date/Time value entered without a date part is stored as 1899-12-30 hh:mm:ss. If you are only interested in the time part then you just need to format the dbgrid column appropriately. (Access automatically does that for you in its own controls, ref: here.)
You can do it programatically, after you open the dataset:
TDateTimeField (FieldByName ('Time')).DisplayFormat:='HH:mm';

custom validation for telerik date picker?

I am using telerik date picker. Date format is dd/mm/yyyy. If user enters it as ddmmyyyy then also it will be converted into format as dd/mm/yyyy. Now if user enters something like ddmmyy i.e. if year is only of 2 digits then i want to throw error message for the same to enter date in valid format. Also this date field is not required. So want to show this message if wrong format of date is entered on blur event of date field.
From my experience and with this demo from the Telerik Site it works if you do ddmmyy or ddmmyyyy by default if you have it set to a culture that commonly uses that style. Ex. Canadian English or en-CA.
If you have have specified your format as "dd/mm/yyyy" then the user will have to enter it as so or it will appear incorrect. You could use some java script to convert it to a proper format, but it would be a lot easier to just set up the date picker properly.

Resources