Create A new DATE field from Existing Short Text Field in MS ACCESS using Append Query - ms-access-2013

I have an MS ACCESS employee database.
It contains 1550 records and there are around 7 date fields, however the field types are Short Text.
The value of all these 7 date fields for the 1550 records are entered as yyyymmdd (e.g. 19870220). They are not of Date/Time field yet.
I would like to either change all these 7 fields for the 1550 records to date fields and the format them as "MM/DD/YYYY".
I've created Update query and also added new fields that are Date/time fields, and used CDATE function like this UptateTO: CDATE([Birthdate]), but I got error.
I used the Append query, also I got error.
Somehow, CDATE() function is not converting the value of the text field to date.
I'm using ACCESS 2013.

Use this expression to update your new date field:
Set TrueBirthDate = CDate(Format([BirthDate], "####/##/##"))
The values carries no format. For display, you can set this in the Format property of the field, or the default format from your Windows settings will be used.

Related

SSRS Date Formatting and European numbers

I created a number of fields in order to sort out why I couldn't easily format my date field as a date (it is date in the database, but with FetchXML it seems to lose the formatting. I know this should be accomplished with nested formulas, but since I kept having errors, I wanted to understand where the problem was exactly.
Date is "CreatedOn" : dd/MM/yyyy hh:mm:ss
I created a field called "SignUpLeft" with this expression:
=Left(Fields!createdon.Value,10)
I created another field, and I called this "Cdate":
=Format(CDate(Fields!SignDateLeft.Value),"dd/MM/yyyy")
I have my report sorting by the "Cdate" field, but it is sorting by the Day, rather than by the month (see pic below.) I have changed the report attribute localization to "es-es".
What else can I do to get the date formatted correctly, in order to sort.

Quicksight parse date into month

Maybe I missed it but I'm attempting to create a dynamic 'Month' parameter based on a datetime field - but can't seem to get just the month! ? Am I missing something ?
here's my source DTTM date/time field -
In Manage Data > Edit [selected] Data Set > Data source
Just add 'calculated field':
truncDate('MM', date)
where MM returns the month portion of the date.
See manual of truncDate function
The only place in Quicksight that you can get just a month, e.g. "September" is on a date-based axis of a visual. To do so, click the dropdown arrow next to the field name in the fields list, select "Format: (date)" then "More Formatting Options..." then "Custom" and enter MMMM in the Custom format input box.
Quicksight menu selection as described
This will then show the full month name on the date axis in your visual. NB It will use the full month name on this visual for ALL time period "Aggregations" - e.g. if you change the visual to aggregate by Quarter, it will display the full name of the quarter's first month etc.
If you are talking about "Parameters" in the Quicksight analysis view then you can only create a "Datetime" formatted parameter and then only use the "Date picker" box format for this parameter in a control (+ filter).
If you use a calculated field in either data preparation or analysis view the only date functions do not allow full month names as an output, you can get the month number as an integer or one of the allowed date formats here:
https://docs.aws.amazon.com/quicksight/latest/user/data-source-limits.html#supported-date-formats
You'll need to hardcode the desired results using ifelse, min, and extract.
Extract will pull out the month as an integer. Quicksight has a desire to beginning summing integers, so we'll put MIN in place to prevent that.
ifelse(min(extract('MM',Date)) = 1,'January',min(extract('MM',Date)) = 2,'February',min(extract('MM',Date)) = 3,'March',min(extract('MM',Date)) = 4,'April',min(extract('MM',Date)) = 5,'May',min(extract('MM',Date)) = 6,'June',min(extract('MM',Date)) = 7,'July',min(extract('MM',Date)) = 8,'August',min(extract('MM',Date)) = 9,'September',min(extract('MM',Date)) = 10,'October',min(extract('MM',Date)) = 11,'November',min(extract('MM',Date)) = 12,'December','Error')
Also, I apologize if this misses the mark. I'm not able to see the screeshot you posted due to security controls here at the office.
You can use the extract function. Works like this:
event_timestamp Nov 9, 2021
extract('MM', event_timestamp)
11
You can add a calculated field using the extract function:
extract returns a specified portion of a date value. Requesting a time-related portion of a date that doesn't contain time information returns 0.
extract('MM', date_field)

Can't remove hours and minutes from datatable

I'm trying to get release date field with y-m-d format.. Actually time format (for y-m-d) seems fine but also it gives h:m:s too, I changed time format at server side and removed h:m:s but datatable still shows them
What I get
2012-04-11 00:00:00
What I want
2012-04-11
Released_at field (Metronic theme - json datatable)
{
field: "released_at",
title: "Release Date",
type: "date",
format: "YYYY/MM/DD"
}
time format (I'm using laravel framework)
protected $dateFormat = "Y-m-d";
How do I fix this ?
Datatable accept column type same as mysql type.
You are trying to convert mysql dateTime column to Date in datatable, which is not possible from datatable.
In your code you have declared
format: "YYYY/MM/DD" // but actual type is dateTime as per mysql.So it will append time next to it.
If you are storing only date in mysql then you can change column type to Date, and your problem gets solved.
And if you want to convert string to date in laravel you can follow this post.
Your database column is of type dateTime which, by definition, includes both date and time information. If you want to remove the time at a database level then use the date type instead
$table->date("released_at")->nullable();
If instead of removing the time from the database, you just want to ignore it for certain parts of your application, you can leverage the fact than in Laravel all dates coming from your models are Carbon\Carbon instances, so you could do
$model->releasedAt->format('y-m-d'); // Returns '18-09-11'

Filter by date in Qlik Cloud

I have sheet in Qlik Cloud, where I have dataset from whole month. I would like to filter this dataset by date or time - 1 day, 1 week, 12 hours... column with date/time in format yyyy/mm/dd hh:mm:ss is in dataset for each row. Is possible insert some calendar? Or have you any idea?
Thanks for your answers ;)
Provided that your data is loaded correctly, drag the field directly onto the sheet. This will create a look-up box that can be searched.
You can see if the field has been identified correctly as a date as it will appear like this on the field selector
Another Option
Create a filter box option and add your date field to it, the benefit of this is that you can have multiple filters in one place. Allowing users to pick the part of the date relevant to them. For example showing the year field, the month field and the date field in one
one more option
Using non-standard Qlik extensions you can achieve the functionality that you require. SenseDateRangePicker is an extension that provides extended date selection functionality.

Hibernate mapping of two properties to one column

I have an object that is generated from XSDs, so I can't change it. In it I have a String DATE and a String TIME (representing the time of day without the date).
DATE = yyyy-mm-dd
TIME = hh:MM:ss:mmmm
In the OracleDB, I don't want to represent these as VARCHAR. I'd like to use DATE or DATETIME. Therefore, I'd need to map both DATE + TIME to one single column, DATETIME.
This is not possible. You can map two columns to a single property (using composites or user types) but not the other way around.
Using the same column name twice in the mapping file usually results in strange exceptions (index out of bounds).
I would use two columns in the database. Convert them to DATE-kind data types using a user type.

Resources