Learn more about page titles
Splitting a date into days, months and years

Last modified

Overview

This section demonstrates how to split a date into days, months and years.

Splitting a date into days, months and years

Certain forms may have the day, month and year split into different fields:

File:test/insolvency/230_21+PDF+templates/090_Additional+Steps/050_Splitting+a+date+into+days%2C+months+and+years/PDF_SplitDate.png

The listing below takes the current date and splits it up accordingly:

INSERT INTO @Data
SELECT 'Today_Day', CAST(datepart(DD, GETDATE()) AS nVarChar(MAX))

INSERT INTO @Data
SELECT 'Today_Month', CAST(datepart(MM, GETDATE()) AS nVarChar(MAX))

INSERT INTO @Data
SELECT 'Today_Year', CAST(datepart(YYYY, GETDATE()) AS nVarChar(MAX))
Page statistics
175 view(s) and 4 edit(s)
Social share
Share this page?

Tags

CCH Insolvency

Comments

You must to post a comment.

Attachments

 

 | Cookie Policy | Copyright | Privacy Policy Terms of Use | Contact Us |