Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using FormatAttribute on a record field has no effect #2141

Open
menaheme opened this issue Mar 29, 2023 · 0 comments
Open

Using FormatAttribute on a record field has no effect #2141

menaheme opened this issue Mar 29, 2023 · 0 comments
Labels

Comments

@menaheme
Copy link

Describe the bug
Using FormatAttribute on a reocrd feild has no effect.

To Reproduce
public record Person(string name, [Format("yyyy-MM-dd")]DateTime birthday);

when writing to a csv file the date is ouputed the same as without using the FormatAttribute

Expected behavior
The output should comply wit the format specified by the Format attribute

Using CsvHelper v30.0.1, .Net v6.0, VS 2022 v17.5

@menaheme menaheme added the bug label Mar 29, 2023
@menaheme menaheme changed the title Using FormatAttribute on a reocrd feild has no effect Using FormatAttribute on a record field has no effect Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant