Kiran_786
Kiran_786

Reputation: 1

How to merge individual date fields like order day, order month and order year to create a order date?

Ex. Order Day "1" Order Month "Jan" Order Year "2020"

Required Date: 1 JAN 2020

Upvotes: 0

Views: 29

Answers (2)

AnilGoyal
AnilGoyal

Reputation: 26218

Let's assume your data is

enter image description here

  • Step-1: Convert all three fields to string type, if not so.
  • Step-2: create a calculated field say order date full with the following calculation
DATE(DATEPARSE("dd:MMM:yyyy", [order date] + ':' + [order month] + ':' + [order year]))

get results like this

enter image description here

Upvotes: 0

vizyourdata
vizyourdata

Reputation: 1444

If each of these are separate fields, I would build a text version of the date and wrap it in the DATE() function, but there are probably a dozen ways to do it differently.

DATE( [OrderYear] + "-" + [OrderMonth] + "-" + [OrderDay] )

Upvotes: 1

Related Questions